MCPcopy
hub / github.com/opentrace/opentrace / zoomIn

Method zoomIn

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

Source from the content-addressed store, hash-verified

2409 }
2410
2411 zoomIn(duration = 200): void {
2412 // Mark this as a user-driven zoom so the auto-fit follower
2413 // doesn't yank the camera back to fit-bounds on the next worker
2414 // tick (Fix #39). Also clear any pending follower target so it
2415 // doesn't fight the animation.
2416 this.hasUserMovedCamera = true;
2417 this.autoFitTarget = null;
2418 const target: Viewport = {
2419 x: this.vp.x,
2420 y: this.vp.y,
2421 scale: this.vp.scale * 1.5,
2422 };
2423 this.cancelAnimation?.();
2424 this.cancelAnimation = animateViewport(
2425 this.vp,
2426 target,
2427 duration,
2428 (vp) => {
2429 this.vp = vp;
2430 },
2431 () => {
2432 this.redrawAllEdges();
2433 this.cancelAnimation = null;
2434 },
2435 );
2436 }
2437
2438 zoomOut(duration = 200): void {
2439 this.hasUserMovedCamera = true;

Callers 2

GraphControlsBarFunction · 0.80

Calls 2

redrawAllEdgesMethod · 0.95
animateViewportFunction · 0.90

Tested by

no test coverage detected