import type { Viewport } from "sprotty-protocol"; import { SetViewportAction as SprottySetViewportAction } from "sprotty-protocol"; import type { CommandExecutionContext, CommandReturn, IStoppableCommand, SModelElementImpl } from "sprotty"; import { SetViewportCommand as SprottySetViewportCommand } from "sprotty"; /** * Extended SetViewportAction with additional properties to control the animation */ export interface SetViewportAction extends SprottySetViewportAction { /** * Additional properties to control the animation * If null, no animation should be performed, but previous ones should be cancelled */ zoomAnimation?: { /** * Overwrites the default animation duration */ animationDuration: number; /** * Overwrites the default easing function */ ease: (x: number) => number; } | null; } /** * Extended SetViewportCommand with additional properties to control the animation */ export declare class SetViewportCommand extends SprottySetViewportCommand implements IStoppableCommand { protected readonly action: SetViewportAction; /** * The key to stop the animation */ stoppableCommandKey: string; /** * The animation which can be stopped */ private animation?; /** * Whether the command has been stopped */ private isStopped; /** * Creates a new SetViewportCommand * * @param action the action to execute */ constructor(action: SetViewportAction); execute(context: CommandExecutionContext): CommandReturn; protected setViewport(element: SModelElementImpl, oldViewport: Viewport, newViewport: Viewport, context: CommandExecutionContext): CommandReturn; stopExecution(): void; } //# sourceMappingURL=viewport.d.ts.map