More comfortable zooming on big canvas
See original GitHub issueI have a very big canvas where items can be located at “top: 6305px; left: 400px;” and even more, sometimes even 20 000 px. When items are so far off the 0,0, then zooming around is not very comfortable is items on canvas do not remain in view and zooming does not work intuitively. I tried to overwrite the zoom functions with trickery to manipulate the translate coordinates, such as:
editor.zoom_out = function(){
if(this.zoom > this.zoom_min) {
this.zoom-=0.1;
this.canvas_y =this.canvas_y - (this.canvas_y/7/this.zoom); //That 7 is just a test
this.zoom_refresh();
}
}
but no success. It requires some kind transformation of canvas coordinates based on zoom multiplier as well as current canvas location but i cannot figure out how. Any ideas on this?
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Forum: Canvas Size and Zoom in Percentage? - DeviantArt
As a general rule, you don't want it to be too small (certainly no smaller than 1000 px wide) otherwise you can't add...
Read more >How to fix extreme zoom - Help & Support - Sparkol
Before you try to correct an extreme zoom issue you should clear any camera position that is set for the elements that have...
Read more >best CANVAS SIZE for digital art what resolution should you ...
Why is your drawing so pixelated when you're zooming in? ... post your art and resolution that will actually be comfortable when you...
Read more >Zoom strategies for huge scatterplots with three.js - Observable
This is a nice in-between size: it's more than canvas can hold, but about 1% the size of the data I want to...
Read more >Teaching Guide: Zoom app in Canvas - UW IT Connect
In your Canvas course, Zoom may appear at the bottom of the course navigation. If you want Zoom to appear higher up the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @jerosoler, works absolutely perfect, good job 👍
Update version to 0.0.30
Fix! 😉
And add a zoom_value https://github.com/jerosoler/Drawflow#editor Thanks!