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

[Zoom/pan] Various issues #117

Open
3 tasks
luucvanderzee opened this issue Nov 25, 2019 · 0 comments
Open
3 tasks

[Zoom/pan] Various issues #117

luucvanderzee opened this issue Nov 25, 2019 · 0 comments
Labels
enhancement New feature or request todo

Comments

@luucvanderzee
Copy link
Collaborator

Things that we still need to change for zoom and pan:

  • The way createZoomHandler and createPanHandler work. The current setup, especially for pan, is very boilerplate-y: you need to declare zoomIdentity, setZoomIdentity, blockReindexing and setBlockReindexing. The 'set' functions have to be defined in the component because Svelte's reactivity does not work in .js files... We should think of a better and cleaner way to set up panning and zooming.
  • The 'extents' option for createZoomHandler didn't seem to work. I was not sure how to properly implement it, so I removed it for now, but it would be nice to put it back eventually.
  • The blockReindexing stuff works for panning, because with panning it is clear when the panning starts (on mousedown/touchdown). But it doesn't work for zooming, because wheel and pinch don't have a 'start' or 'end' (if that makes sense). So if you are zooming with wheel or pinch, every time the event fires, all the affected marks will re-index. This can cause potential performance problems. A possible solution if to have a debounceReindexing option, that will only trigger the reindexing after a certain time period has elapsed. So that if you are zooming in and out the reindexing will only happen when you're done zooming. Should not be too hard to implement
@luucvanderzee luucvanderzee added enhancement New feature or request todo labels Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request todo
Projects
None yet
Development

No branches or pull requests

1 participant