change direction of zoom

This commit is contained in:
Nick Fisher
2022-10-03 14:56:53 +11:00
parent b66995d9b8
commit fac6eebf28

View File

@@ -108,7 +108,7 @@ class _GestureDetectingFilamentViewState
onScaleUpdate: (d) async {
if (d.pointerCount == 2) {
if (_lastScale != 0) {
await widget.controller.zoomUpdate(100 * (d.scale -_lastScale));
await widget.controller.zoomUpdate(100 * (_lastScale - d.scale));
}
} else {
await _functionUpdate(d.focalPoint.dx, d.focalPoint.dy);