Skip to content

Conversation

@tetreum
Copy link

@tetreum tetreum commented Aug 10, 2015

DO NOT MERGE THIS PULL REQUEST

This is what i'm using to be able to rotate an object without having to mouse over it. The problem is that would crash on "jquery zero-dependancy".
I only made the pull request to show my idea and maybe implement it in a better way.

@PixelsCommander
Copy link
Owner

Hello

Could you elaborate on case you faced? This sounds a bit unexpected and confusing. Is this http://pixelscommander.com/polygon/twopropellers/ something you want to have? Controlling one element by another?

@mattwright324
Copy link

I experienced the same issue and this change by @tetreum is almost perfect.

To elaborate on the issue, you are unable to rotate/propel an element when the mouse leaves the element ... fires onStop. This means smaller elements like 40x40 (unlike the very large propellers in your examples) that can be difficult to stay inside of are difficult to rotate/propel.

However, this change isn't perfect because it continues to rotate/move with the mouse while outside the element when you had let off on holding the mouse. The only way to stop it is to go back and click on the element.

@mattwright324
Copy link

The problem I faced is easily fixed by adding $(document).on('mouseup.propeller', this.onRotationStop); to the addListeners section where he had added listening to mousemove.propeller.

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.

3 participants