Skip to content

swap the call for the changes() method - #6

Merged
johnbarrierwilson merged 1 commit into
simplefocus:masterfrom
dciccale:patch-1
Sep 5, 2013
Merged

swap the call for the changes() method#6
johnbarrierwilson merged 1 commit into
simplefocus:masterfrom
dciccale:patch-1

Conversation

@dciccale

@dciccale dciccale commented Sep 5, 2013

Copy link
Copy Markdown
Contributor

this swap of lines is to make the call of the changes() a little bit more robust. Imagine a remote possibility of the window element being resized while the plugin is initialising, this will make a call of the changes() method because of the resize event (if this one happens after registering the listener) and another call of changes() that can't be omitted because it will always be called on initialise.
However making this modification the changes() method will be called first, but if the resized stops before registering the listener, the second call will not happen.

Comment thread flowtype.js

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the eof was changed by github, sorry

@johnbarrierwilson

Copy link
Copy Markdown
Contributor

Small performance improvements like this will go a long way! Thanks for the heads up. Merging now.

johnbarrierwilson added a commit that referenced this pull request Sep 5, 2013
swap the call for the changes() method
@johnbarrierwilson
johnbarrierwilson merged commit ccfd8c7 into simplefocus:master Sep 5, 2013
@dciccale
dciccale deleted the patch-1 branch September 5, 2013 22:27
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.

2 participants