-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stuck loading model #2
Comments
I am having the same problem. Please let me know if you find a way around. |
I gave up and used ipycanvas ... found a good example that worked like a charm. |
It seems that the widget is not compatible with the last version of jupyterlab. I downgraded it to 1.2.4 and it works |
Hi jiver54, |
I sort of put things together from
https://github.com/martinRenou/ipycanvas
I did find some mouse drawing examples
These are the bits of mouse code I used... It's strange that it does not
seem to pass the (x,y) however it seems to get there!
# sets up the layers
from ipycanvas import MultiCanvas, hold_canvas
canvas = MultiCanvas(3, width=width, height=height)
background_layer = canvas[0]
drawing_layer = canvas[1]
interaction_layer = canvas[2]
...
# Functions to do stuff
def draw_line(canvas, start, end):
canvas.begin_path()
canvas.move_to(start[0], start[1])
canvas.line_to(end[0], end[1])
canvas.stroke()
canvas.close_path()
def on_mouse_down(x, y):
global drawing
global start
if not drawing:
drawing_layer.clear()
start = (x, y)
TopX.value=str(int(x))
TopY.value=str(int(y))
else:
with hold_canvas(canvas):
draw_line(drawing_layer, start, (x, y))
BtmX.value=str(int(x))
BtmY.value=str(int(y))
interaction_layer.clear()
start = None
drawing = not drawing
def on_mouse_move(x, y):
if not drawing:
return
with hold_canvas(canvas):
interaction_layer.clear()
draw_line(interaction_layer, start, (x, y))
# sets the functions to trigger when there is mouse activity
interaction_layer.on_mouse_down(on_mouse_down)
interaction_layer.on_mouse_move(on_mouse_move)
…On Fri, 27 Nov 2020 at 08:47, Tobias Zwiehoff ***@***.***> wrote:
I gave up and used ipycanvas ... found a good example that worked like a
charm.
Hi jiver54,
could you please share that ipycanvas example?
I am stuck with the clickable image widget.
Thank you!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANKI56OPBCGGELJDOSDV3D3SR3EF5ANCNFSM4JQM6BTQ>
.
--
*Graeme Murphy B.E.(Civil) DipEd*
*Tech-Rentals Pty Ltd*
18 Joseph St
Blackburn Nth
Victoria Australia
- Email: [email protected]
<[email protected]>
- Mobile: +61447 118 778
- Phone: 03 98963067
- Fax: 03 9896 3099
- Home Email: [email protected]
- Home Phone: +613 9893 1777
|
After an update, the widget doesn't load and gets stuck saying loading widget. Is it possible to get this updated for the newer JupiterLab versions? Is it also possible to get this on the Jupyter extension Manager?
The text was updated successfully, but these errors were encountered: