Skip to content

[Zoom/pan] Various issues #117

@luucvanderzee

Description

@luucvanderzee

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions