Commit 663ff906 authored by Michael Droettboom's avatar Michael Droettboom

Scroll into view if figure is already displayed on the page.

parent 2128618f
......@@ -105,6 +105,12 @@ class FigureCanvasWasm(backend_agg.FigureCanvasAgg):
return (window.devicePixelRatio or 1) / backing_store
def show(self):
existing = self.get_element('')
if existing is not None:
self.draw_idle()
existing.scrollIntoView()
return
def ignore(event):
event.preventDefault()
return False
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment