Class ShapeItemHandler
Inheritance
ShapeItemHandler
Constructors
(constructor)(path, item, textWhizz, apiClient, colorPreviewService)
Constructs a new instance of the ShapeItemHandler class
Declaration
constructor(path?: Path, item?: ShapeItem, textWhizz?: typeof TextWhizz, apiClient?: IDesignAtomsApiClient, colorPreviewService?: IListenableColorPreviewService);
Parameters
Properties
_addedOnCanvasEvent
Declaration
protected _addedOnCanvasEvent: EventObject<void>;
Property Value
_apiClient
Declaration
protected _apiClient: IDesignAtomsApiClient;
Property Value
_areColorPreviewsReady
Declaration
protected get _areColorPreviewsReady(): boolean;
Property Value
_isLoadedPath
Declaration
protected _isLoadedPath: boolean;
Property Value
_isLoadingPath
Declaration
protected _isLoadingPath: boolean;
Property Value
_isReadyToDraw
Declaration
protected get _isReadyToDraw(): boolean;
Property Value
_originalPathId
Declaration
protected _originalPathId: string;
Property Value
_path
Declaration
Property Value
_pathChangedDelegate
Declaration
protected _pathChangedDelegate: any;
Property Value
item
Declaration
get item(): ShapeItem;
set item(item: ShapeItem);
Property Value
originalPath
Declaration
get originalPath(): Path;
set originalPath(path: Path);
Property Value
typeName
Declaration
static readonly typeName: string;
Property Value
Methods
_createDataInstance(itemHandler)
Declaration
protected _createDataInstance(itemHandler?: ShapeItemHandler): ShapeHandlerData;
Parameters
Returns
_getActualBorderWidth()
Declaration
protected _getActualBorderWidth(): number;
Returns
_getBoundsMargin()
Declaration
protected _getBoundsMargin(): number;
Returns
_getColors()
Declaration
protected _getColors(): Color[];
Returns
_getItemColorPreviews()
Declaration
protected _getItemColorPreviews(): {
fillColorPreview?: RgbColor;
borderColorPreview?: RgbColor;
altBorderColorPreview?: RgbColor;
};
Returns
Declaration
protected _getTransformedPath(): Path;
Returns
_onAddedOnCanvas(canvas, supressUpdate)
Declaration
protected _onAddedOnCanvas(canvas: ICanvas, supressUpdate?: boolean): void;
Parameters
| Type |
Name |
Description |
| ICanvas |
canvas |
|
| boolean |
supressUpdate |
|
Returns
_onItemPropertyChanged(sender, propertyName)
Declaration
protected _onItemPropertyChanged(sender: ShapeItem, propertyName: string): void;
Parameters
| Type |
Name |
Description |
| ShapeItem |
sender |
|
| string |
propertyName |
|
Returns
_setDataItem(item, itemHandlerData)
Declaration
protected _setDataItem(item: ShapeItem, itemHandlerData: any): void;
Parameters
| Type |
Name |
Description |
| ShapeItem |
item |
|
| any |
itemHandlerData |
|
Returns
_updateImpl(beforeUpdate, afterUpdate)
Declaration
protected _updateImpl(beforeUpdate?: Function, afterUpdate?: Function): Promise<void>;
Parameters
| Type |
Name |
Description |
| Function |
beforeUpdate |
|
| Function |
afterUpdate |
|
Returns
| Type |
Description |
| Promise<void> |
|
drawItemHandler(itemHandlerCtx)
Declaration
drawItemHandler(itemHandlerCtx: CanvasRenderingContext2D): void;
Parameters
| Type |
Name |
Description |
| CanvasRenderingContext2D |
itemHandlerCtx |
|
Returns
getOriginalPathId()
Declaration
getOriginalPathId(): string;
Returns
getTextWrappingPath()
Declaration
getTextWrappingPath(): Path;
Returns
onTextWhizzInit()
Declaration
Returns
setOriginalPathId(id)
Declaration
setOriginalPathId(id: string): Promise<void>;
Parameters
| Type |
Name |
Description |
| string |
id |
|
Returns
| Type |
Description |
| Promise<void> |
|