Skip to content
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

FIX: resizing a figure in webagg #4035

Merged
merged 1 commit into from Jan 26, 2015

Conversation

eyurtsev
Copy link
Contributor

Resizing in webagg doesn't work because the figure grabs mouse events (#3338).

This is an iteration over a previous pull request (#3341), including the minimal changes required to fix the problem.

I don't think that the debouncing is necessary anymore, so I removed it. I tested this with both a static plot and animations.

This addresses 90% of the problem.

Resizing issues will reappear if working with multiple figures on the same page.
Refactoring would be necessary probably to introduce some "resizing manager" that will prevent mouse events from being passed to all figures while any figure is being resized.

@blink1073
Copy link
Member

Tested, LGTM, 👍

function mouse_event_fn(event) {
return fig.mouse_event(event, event['data']);
if (pass_mouse_events)
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style nit: we haven't been using braces if there is only one statement.

@eyurtsev
Copy link
Contributor Author

@blink1073 how do I submit a revision to the code?

If I remove the brackets and push the new code to my fork on github will the pull request here get automatically synhronized?

@blink1073
Copy link
Member

Yes, you can keep pushing changes to your fix_webagg_resize_02 branch.

@eyurtsev
Copy link
Contributor Author

Curly braces have been terminated.

But an accidental commit was added!

@eyurtsev
Copy link
Contributor Author

Well, just did my first rebase. And forced a push into github repository. There should be only a single commit. :)

@blink1073
Copy link
Member

Looks good @eyurtsev. You didn't necessarily have to rebase for just one extra commit.

@tacaswell tacaswell added this to the v1.4.3 milestone Jan 26, 2015
@pelson
Copy link
Member

pelson commented Jan 26, 2015

👍 LGTM

tacaswell added a commit that referenced this pull request Jan 26, 2015
@tacaswell tacaswell merged commit 61fd742 into matplotlib:master Jan 26, 2015
@tacaswell
Copy link
Member

also, improved functionality with a net removal of code!

tacaswell added a commit that referenced this pull request Jan 26, 2015
@tacaswell
Copy link
Member

back ported as 7468be2

@eyurtsev
Copy link
Contributor Author

@blink1073 it was time to learn :)

@eyurtsev eyurtsev deleted the fix_webagg_resize_02 branch January 28, 2015 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants