kevinconka commited on
Commit
c44ce0b
·
1 Parent(s): d8a4502

Update zoom functionality in app.js to ensure world transformation is applied during zoom operations

Browse files

- Added a call to `updateWorldTransform()` in the `flushZoomVisuals()` function to maintain visual consistency.
- Removed redundant call to `updateWorldTransform()` in the `applyZoom()` function, streamlining the zoom process.

Files changed (1) hide show
  1. app.js +1 -1
app.js CHANGED
@@ -478,6 +478,7 @@
478
  function flushZoomVisuals() {
479
  zoomVisualRaf = 0
480
  if (!svg || SCALE <= 0) return
 
481
  rebuildWorldSvg()
482
  }
483
 
@@ -489,7 +490,6 @@
489
  var factor = delta > 0 ? 1.12 : 1 / 1.12
490
  zoomLevel = Math.max(0.3, Math.min(8, zoomLevel * factor))
491
  SCALE = viewportMaxCornerPx() / BASE_VIEW_RADIUS_KM * zoomLevel
492
- updateWorldTransform()
493
  scheduleZoomVisuals()
494
  updateZoomLabel()
495
  }
 
478
  function flushZoomVisuals() {
479
  zoomVisualRaf = 0
480
  if (!svg || SCALE <= 0) return
481
+ updateWorldTransform()
482
  rebuildWorldSvg()
483
  }
484
 
 
490
  var factor = delta > 0 ? 1.12 : 1 / 1.12
491
  zoomLevel = Math.max(0.3, Math.min(8, zoomLevel * factor))
492
  SCALE = viewportMaxCornerPx() / BASE_VIEW_RADIUS_KM * zoomLevel
 
493
  scheduleZoomVisuals()
494
  updateZoomLabel()
495
  }