Skip to content

Commit

Permalink
Temporarily disable event listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
agriyakhetarpal committed Dec 10, 2024
1 parent 2e93101 commit 09abbb4
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions matplotlib_pyodide/browser_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,14 @@ def ignore(event):
rubberband.setAttribute("tabindex", "0")
# Event handlers are added to the canvas "on top", even though most of
# the activity happens in the canvas below.
add_event_listener(rubberband, "mousemove", self.onmousemove)
add_event_listener(rubberband, "mouseup", self.onmouseup)
add_event_listener(rubberband, "mousedown", self.onmousedown)
add_event_listener(rubberband, "mouseenter", self.onmouseenter)
add_event_listener(rubberband, "mouseleave", self.onmouseleave)
add_event_listener(rubberband, "keyup", self.onkeyup)
add_event_listener(rubberband, "keydown", self.onkeydown)
# Temporarily disable event listeners for rubberband canvas
# add_event_listener(rubberband, "mousemove", self.onmousemove)
# add_event_listener(rubberband, "mouseup", self.onmouseup)
# add_event_listener(rubberband, "mousedown", self.onmousedown)
# add_event_listener(rubberband, "mouseenter", self.onmouseenter)
# add_event_listener(rubberband, "mouseleave", self.onmouseleave)
# add_event_listener(rubberband, "keyup", self.onkeyup)
# add_event_listener(rubberband, "keydown", self.onkeydown)
context = rubberband.getContext("2d")
context.strokeStyle = "#000000"
context.setLineDash([2, 2])
Expand Down

0 comments on commit 09abbb4

Please sign in to comment.