giannissc / druid-extras

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zoom/Panning/Scroll Controller

giannissc opened this issue · comments

Example usecases:

  • node graph
  • map
  • infinite canvas
  • a pdf page larger than widget size
  • image larger than widget size

Controllers:

  • Zoom Controler -> Ctrl + Wheel event handling
  • Scroll Controller -> up/down + left/right (for mice that have this functionality) wheel event handling. + Interacetion with scroll ui elements
  • Pan Controller -> Middle Click + Drag - Widget interaction handling. There are two scenarios for this:
    • Normal Widget: Elements might extend beyond the boundaries of viewport and will need to be clipped
    • Virtual Widget: Widget elements never extend beyond viewport. Widget processes and renders only elements within the viewport.

Relevant Resrouces:

Other features:

  • Zoom to selection (#10)
  • Zoom to fit