Sprotty
Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Class. Viewport Animation

newViewport

protected newViewport: Viewport

Defined in: packages/sprotty/src/features/viewport/viewport.ts:113


oldViewport

protected oldViewport: Viewport

Defined in: packages/sprotty/src/features/viewport/viewport.ts:112


stopped

protected stopped: boolean = false

Defined in: packages/sprotty/src/base/animations/animation.ts:30

Inherited from

Animation.stopped


zoomFactor

protected zoomFactor: number

Defined in: packages/sprotty/src/features/viewport/viewport.ts:109

Methods

start()

start(): Promise<SModelRootImpl>

Defined in: packages/sprotty/src/base/animations/animation.ts:32

Returns

Promise<SModelRootImpl>

Inherited from

Animation.start


stop()

stop(): void

Defined in: packages/sprotty/src/base/animations/animation.ts:74

Stop the animation at the current state. The promise returned by start() will be resolved with the current state after the next tweening step.

Returns

void

Inherited from

Animation.stop


tween()

tween(t, context): SModelRootImpl

Defined in: packages/sprotty/src/features/viewport/viewport.ts:119

This method called by the animation at each rendering pass until the duration is reached. Implement it to interpolate the state.

Parameters

t

number

varies between 0 (start of animation) and 1 (end of animation)

context

CommandExecutionContext

Returns

SModelRootImpl

Overrides

Animation.tween