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

Manually setting position. #3

Open
KupferudelWolf opened this issue Jan 31, 2022 · 1 comment
Open

Manually setting position. #3

KupferudelWolf opened this issue Jan 31, 2022 · 1 comment

Comments

@KupferudelWolf
Copy link

KupferudelWolf commented Jan 31, 2022

Great tool! However, it seems a bit difficult to repurpose this to follow the mouse (or otherwise manually set an X and Y position), at least from how it's currently built. Perhaps it would help to have a setX and setY function built into the magnifier object?

Additionally, from a UX perspective, it would make more sense for the viewfinder to focus on the point at its center, not its upper-left. I was able to quick-fix that by setting the element's "transform" to "translate" with the X and Y as -S/(Z*2); S as the width / height for X and Y (respectively), and Z as the zoom. I know there's more elegant ways, though.

@Cosmicore
Copy link

Additionally, from a UX perspective, it would make more sense for the viewfinder to focus on the point at its center, not its upper-left.

Did the exact same trick to move the lens focus to the center. Such option is very desirable in the tool itself.

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

No branches or pull requests

2 participants