Git Product home page Git Product logo

jp_doodle's People

Contributors

aaronwatters avatar lingruiluo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jp_doodle's Issues

Using a dual_canvas in a separate window

I would like to develop a relatively simple interactive interface that can be accessed without any code or editor from jupyter. Ideally, just by running a python script from the terminal, a browser window would open with the interface (built in a dual_canvas) running.
I understand that this is meant to be used inside jupyter, but how much more difficult would it be to open a page with all widgets working.
Because if there is a way to get that working - this library could basically replace most GUI packages for python (which tend to be very old and annoying).

Anyway, this library is fantastic - keep up the great work!

keyboard shortcut for snapshot

copied from jupyter google group:

Interesting..

So the idea is that you can build an interactive in the first tab/canvas panel, then grab a snapshot of it that appears in the second?

If there is an interactive where the view is dependent on the mouse cursor position, eg in the Simple Python Example notebook, the image color sampling demo, is there a keybord short cut to click the Take snapshot button? (else how do you get to click the button without moving the mouse cursor away from the point you want to sample/snapshot?)

Is there any way of getting the snapshot into a variable (eg _ ) with a corresponding image data URI value?

--tony (hirst)

Another example doodle - flowchart.js

Been tinkering again... here's another possible misc example - flowchart.js

import jp_proxy_widget

fcode = '''
st=>start: Start|past:>http://www.google.com[blank]
e=>end: End|future:>http://www.google.com
op1=>operation: My Operation|past
op2=>operation: Stuff|current
sub1=>subroutine: My Subroutine|invalid
cond=>condition: Yes
or No?|approved:>http://www.google.com
c2=>condition: Good idea|rejected
io=>inputoutput: catch something...|future

st->op1(right)->cond
cond(yes, right)->c2
cond(no)->sub1(left)->op1
c2(yes)->io->e
c2(no)->op2->e
'''

class FlowchartWidget(jp_proxy_widget.JSProxyWidget):
    def __init__(self, *pargs, **kwargs):
        super(FlowchartWidget, self).__init__(*pargs, **kwargs)
        e = self.element
        
        # Call some standard jQuery method on the widget element:
        e.empty()
        # This is for the controls as well as the simulator
        e.width("1000") # 1181px 2362
        e.height("1000") # 551px 1143
        html = '<div id="fchart_canvas"></div>'
        e.html(html)
        self.load_js_files(["https://cdnjs.cloudflare.com/ajax/libs/raphael/2.3.0/raphael.min.js",
                            'https://cdnjs.cloudflare.com/ajax/libs/flowchart/1.13.0/flowchart.js'])
        
    def charter(self, chart):
        self.set_element("chartdef", chart)
        self.js_init("chart = flowchart.parse(element.chartdef); chart.drawSVG('fchart_canvas');")
        
testEmbed = FlowchartWidget()
testEmbed.charter(fcode)
testEmbed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.