@daign/2d-graphics
Version:
Two dimensional graphics library that implements the daign-2d-pipeline.
29 lines (28 loc) • 1.11 kB
TypeScript
import { ITargetContext } from '../iTargetContext';
import { Application } from './application';
import { Viewport } from './viewport';
/**
* Group that acts as an interactive viewport by applying a transformation from user input.
*/
export declare class InteractiveViewport extends Viewport {
private viewportHandle;
/**
* Get a vector from the touch position of an event relative to the drawing's context.
* Will throw error when the event does not contain position information.
* @param event - The event to use.
* @param touchIndex - The index of the touch point.
* @returns The resulting vector.
*/
private extractFromTouchEventRelativeToContext;
/**
* Constructor.
* @param context - The target context.
* @param application - The corresponding application.
*/
constructor(context: ITargetContext, application: Application);
/**
* Enable or disable the viewport actions like panning and zooming.
* @param enabled - Whether to enable or disable the actions.
*/
enableViewportActions(enabled: boolean): void;
}