Pinch on mobile devices (this was a tough one because it required simultaneous zooming and panning, but only if pan hasn't been set to false).
Scrolling on desktop (but to avoid interrupting scrolling, there is a 500ms timeout where Mafs waits for scroll idle).
Pinching on desktop (like with a trackpad).
This introduces a new matrix into Mafs' pile of matrices, camera, which is used to transform (xMin, yMin) and (xMax, yMax). This counterintuitively means that translations and scaling are reversed—if camera has a scale of 2, that's equivalent to being "zoomed 0.5x".
Closes #98.
Allows zooming via:
pan
hasn't been set to false).This introduces a new matrix into Mafs' pile of matrices,
camera
, which is used to transform(xMin, yMin)
and(xMax, yMax)
. This counterintuitively means that translations and scaling are reversed—ifcamera
has a scale of 2, that's equivalent to being "zoomed 0.5x".