diagram-js
Version:
A toolbox for displaying and modifying diagrams on the web
33 lines (29 loc) • 675 B
TypeScript
/**
* A handler that implements reversible addition of shapes.
*
*/
export default class CreateShapeHandler {
static $inject: string[];
/**
* @param canvas
*/
constructor(canvas: Canvas);
/**
* Appends a shape to a target shape
*
* @param context
* shape to the parent's children.
*/
execute(context: {
parent: Element;
position: Point;
parentIndex?: number;
}): any;
/**
* Undo append by removing the shape
*/
revert(context: any): any;
}
type Element = import("../../../model/Types.js").Element;
type Point = import("../../../util/Types.js").Point;
type Canvas = import("../../../core/Canvas.js").default;