-
Notifications
You must be signed in to change notification settings - Fork 27
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
Preserve the tip position when growing #57
Comments
It really depends on the cursor icon and the "xhot/yhot" values that can be read from the shell... https://github.com/jeffchannell/jiggle/blob/master/effects/ScalingEffect.js#L80 |
Unfortunately, I do not completely understand the code, but if it helps, here are some calculations that might save you at least a little bit of time: Original cursor: Scaled cursor: Then for the tips to coincide, we need: So we should take: If our scaling factor is r, then: (Same for y0.) There seems to be some conversion between center and corner position in your code, but I did not quite understand when you need which, but the conversion should follow from: |
I've made some adjustments in the master branch for cursor positioning as I was revamping the animations to remove Tweener. Adding some modifiers to the X and Y offsets seems to get the fake cursor incredibly close for each supported size. Feel free to |
If the cursor is grown and I want to click on something, the tip of the enlarged pointer is not the point the click will register at. This can lead to accidental clicks on the wrong button or similar.
Would it be difficult to make the cursor grow "away from the tip" so that the position of the tip is preserved?
The text was updated successfully, but these errors were encountered: