(duration = 200)
| 2436 | } |
| 2437 | |
| 2438 | zoomOut(duration = 200): void { |
| 2439 | this.hasUserMovedCamera = true; |
| 2440 | this.autoFitTarget = null; |
| 2441 | const target: Viewport = { |
| 2442 | x: this.vp.x, |
| 2443 | y: this.vp.y, |
| 2444 | scale: this.vp.scale / 1.5, |
| 2445 | }; |
| 2446 | this.cancelAnimation?.(); |
| 2447 | this.cancelAnimation = animateViewport( |
| 2448 | this.vp, |
| 2449 | target, |
| 2450 | duration, |
| 2451 | (vp) => { |
| 2452 | this.vp = vp; |
| 2453 | }, |
| 2454 | () => { |
| 2455 | this.redrawAllEdges(); |
| 2456 | this.cancelAnimation = null; |
| 2457 | }, |
| 2458 | ); |
| 2459 | } |
| 2460 | |
| 2461 | resetCamera(duration = 300): void { |
| 2462 | // Explicit "Reset View" re-enables auto-fit for subsequent data changes. |
no test coverage detected