elm-designer
elm-designer copied to clipboard
Implement proper workspace pan and zoom capability
Currently Elm Designer uses the native page CSS overflow and scroll behavior to allow the workspace to be bigger than the browser viewport.
We can swap the current implementation with something more polished by leveraging the Zoom abstraction from the elm-visualization package or elm-pan-and-zoom .
A first proof of concept implementation seems promising: https://ellie-app.com/gS7tKm4BVPNa1
We aim to mimic Figma and Sketch here and map UI commands as follows:
- Zoom in/out: Cmd/Ctrl down + mouse wheel
- Combined X/Y panning: Spacebar down + dragging
- Horizontal translation: horizontal scrolling/wheel
- Vertical translation: horizontal scrolling/wheel