import { CanvasElementInterface, CanvasElementName, CanvasElementOptions, TransformPermissions } from './types'; import CanvasElementPlugin from '../plugin/abstract/CanvasElementPlugin'; export default abstract class CanvasElement implements CanvasElementInterface { /** * The ID of the element as a UUIDv4 * @public */ readonly id: string; /** * Determines if the canvas element should be displayed for only a set period of time * @public */ readonly temporary: boolean; /** * The ID of the creator of the canvas element * @public */ readonly creatorId: string; /** * The ID of the view the canvas element relates to * @public */ readonly viewId: string; /** * Return the name of the canvas element * @returns CanvasElementName */ abstract name: CanvasElementName; /** * The transformation data. Includes skew, scale and rotation * @public */ transform: Array; /** * Determines which transforms are allowed to be preformed */ permissions: TransformPermissions; /** * The icon plugin for the canvas * @public */ plugins: Array; /** * Timestamp the canvas element was created * @public */ readonly timestamp: number; /** * Construct the canvas element * @param options * @protected */ protected constructor(options: CanvasElementOptions); }