MCPcopy
hub / github.com/opentrace/opentrace / zoomOut

Method zoomOut

ui/src/components/pixi/PixiRenderer.ts:2438–2459  ·  view source on GitHub ↗
(duration = 200)

Source from the content-addressed store, hash-verified

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.

Callers 2

GraphControlsBarFunction · 0.80

Calls 2

redrawAllEdgesMethod · 0.95
animateViewportFunction · 0.90

Tested by

no test coverage detected