updateScalebyDelta method
Increment or decrement the scale by an additive delta value. Clamps to the zoom limits while preserving the focal point.
Implementation
void updateScalebyDelta(double delta, {Offset? focalPoint}) {
stopAnimation();
// added focalPoint param
focalPoint ??= Offset(canvasSize.width / 2, canvasSize.height / 2);
final newScale = _clampScale(_scale + delta);
_gsTopLeftOffset = newGsTopLeftOnScaling(
_gsTopLeftOffset,
focalPoint,
_scale,
newScale,
);
_scale = newScale;
markDirty();
}