Commit ba848914 authored by Michael Droettboom's avatar Michael Droettboom

Don't call draw_idle too many times

parent 82ddc3f0
......@@ -166,6 +166,7 @@ class FigureCanvasWasm(backend_agg.FigureCanvasAgg):
def draw(self):
# Render the figure using Agg
self._idle_scheduled = True
orig_dpi = self.figure.dpi
if self._ratio != 1:
self.figure.dpi *= self._ratio
......@@ -174,6 +175,8 @@ class FigureCanvasWasm(backend_agg.FigureCanvasAgg):
# Copy the image buffer to the canvas
width, height = self.get_width_height()
canvas = self.get_element('canvas')
if canvas == None:
return
image_data = ImageData.new(
self.buffer_rgba(),
width, height);
......
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