matplotlib/matplotlib — pull request #3341 by eyurtsev (2014-08-03 17:23:28+00:00)
Title: fixed figure resizing in webagg

This is a fix for this issue: https://github.com/matplotlib/matplotlib/issues/3338

Currently, resizing does not work well in the webagg backend because mouse events are not ignored during the resize, which makes it both difficult and slow to do.

The code below ignores mouse events while resizing, but the fix is only for the figure in question. (So resizing figure #1 over figure #2 won't stop figure #2 from responding to mouse events.)

I also included some cosmetic changes: while resizing the figure, the figure is not rendered continuously but is replaced by a light gray box. This makes the resizing look a lot smoother in my opinion.

I have (very) little experience with javascript/html/css, so I wasn't sure where to place the CSS code for the "boxme" class. (It's directly in the javascript below, which probably isn't the best idea.)