Steps a factor by deltaSteps * ZOOM_STEP, then clamps and rounds. An off-grid factor (a typed
percentage) first moves to the grid mark it has passed in the direction of travel, so one step
never skips the nearest mark: from 1.37, +1 gives 1.4 and -1 gives 1.3.
Parameters
factor: number
The current zoom factor
deltaSteps: number
Number of steps to apply (+1 = zoom in, −1 = zoom out)
Returns number
The new clamped, rounded zoom factor
This export is unstable and may change shape or disappear without notice
Steps a factor by
deltaSteps * ZOOM_STEP, then clamps and rounds. An off-grid factor (a typed percentage) first moves to the grid mark it has passed in the direction of travel, so one step never skips the nearest mark: from 1.37,+1gives 1.4 and-1gives 1.3.