Class NewBaseTextItemHandler
Inheritance
NewBaseTextItemHandler
Constructors
(constructor)(fontRegistry, textEditorControllerFactory, item, textWhizz, apiClient, colorPreviewService, colorParser)
Constructs a new instance of the NewBaseTextItemHandler class
Declaration
protected constructor(fontRegistry: FontRegistry, textEditorControllerFactory: ITextEditorControllerFactory, item?: BaseTextItem, textWhizz?: typeof TextWhizz, apiClient?: IDesignAtomsApiClient, colorPreviewService?: IListenableColorPreviewService, colorParser?: IColorParser);
Parameters
Properties
_colorParser
Declaration
protected _colorParser: IColorParser;
Property Value
_enteredEditModeEvent
Declaration
protected readonly _enteredEditModeEvent: EventWithSenderArg<unknown, unknown>;
Property Value
_exitedEditModeEvent
Declaration
protected readonly _exitedEditModeEvent: EventWithSenderArg<unknown, unknown>;
Property Value
_staticTextRect
Declaration
protected _staticTextRect: RectangleF;
Property Value
_textEditorController
Declaration
protected _textEditorController: ITextEditorController;
Property Value
colorPreviewService
Declaration
get colorPreviewService(): IListenableColorPreviewService;
Property Value
editing
Declaration
Property Value
enteredEditModeEvent
Declaration
get enteredEditModeEvent(): EventWithSenderArg<unknown, unknown>;
Property Value
exitedEditModeEvent
Declaration
get exitedEditModeEvent(): EventWithSenderArg<unknown, unknown>;
Property Value
frontEndRenderingReady
Declaration
get frontEndRenderingReady(): boolean;
Property Value
inPlaceEditingEnabled
Declaration
get inPlaceEditingEnabled(): boolean;
Property Value
isInEdit
Declaration
Property Value
item
Declaration
get item(): BaseTextItem;
set item(item: BaseTextItem);
Property Value
| Type |
Description |
| BaseTextItem |
|
textCropped
Declaration
get textCropped(): boolean;
Property Value
textEditor
Declaration
get textEditor(): ITextEditor;
Property Value
| Type |
Description |
| IFontRegistry |
|
textEditorController
Declaration
get textEditorController(): ITextEditorController;
Property Value
typeName
Declaration
static readonly typeName: string;
Property Value
Methods
_applyTransform(item, transform, center)
Declaration
protected abstract _applyTransform(item: BaseTextItem, transform: Transform, center: PointF): void;
Parameters
Returns
_createDataInstance(itemHandler)
Declaration
protected _createDataInstance(itemHandler?: ShapeItemHandler): ShapeHandlerData;
Parameters
Returns
_drawHandlerEffects(ctx)
Declaration
protected _drawHandlerEffects(ctx: CanvasRenderingContext2D): void;
Parameters
| Type |
Name |
Description |
| CanvasRenderingContext2D |
ctx |
|
Returns
_endTransform(changed, resized)
Declaration
_endTransform(changed: boolean, resized: boolean): void;
Parameters
| Type |
Name |
Description |
| boolean |
changed |
|
| boolean |
resized |
|
Returns
_getBaselineDrawStates()
Declaration
protected _getBaselineDrawStates(): ItemHandlerState[];
Returns
_getBoundsMargin()
Declaration
protected _getBoundsMargin(): number;
Returns
_getColors()
Declaration
protected _getColors(): Color[];
Returns
_getCurrentState()
Declaration
protected _getCurrentState(): ItemHandlerState;
Returns
_getEndTransformTrigger(resized)
Declaration
protected _getEndTransformTrigger(resized: boolean): string;
Parameters
| Type |
Name |
Description |
| boolean |
resized |
|
Returns
_getPreviewScaleLimits()
Declaration
protected _getPreviewScaleLimits(): {
min: number;
max: number;
};
Returns
| Type |
Description |
| {
min: number;
max: number;
} |
|
_isReady()
Declaration
protected _isReady(): boolean;
Returns
_needToDrawBaseline()
Declaration
protected _needToDrawBaseline(): boolean;
Returns
_onAddedOnCanvas(canvas)
Declaration
protected _onAddedOnCanvas(canvas: ICanvas): void;
Parameters
| Type |
Name |
Description |
| ICanvas |
canvas |
|
Returns
_onFrontEndRenderingInitialized()
Declaration
protected _onFrontEndRenderingInitialized(): void;
Returns
_onItemPropertyChanged(sender, propertyName)
Declaration
protected _onItemPropertyChanged(sender: BaseTextItem, propertyName: string): void;
Parameters
| Type |
Name |
Description |
| BaseTextItem |
sender |
|
| string |
propertyName |
|
Returns
_onItemVisibilityChanged()
Declaration
protected _onItemVisibilityChanged(): void;
Returns
_onRemovedFromCanvas(canvas)
Declaration
protected _onRemovedFromCanvas(canvas: any): void;
Parameters
| Type |
Name |
Description |
| any |
canvas |
|
Returns
_onTextManagerEnteredEditMode()
Declaration
protected _onTextManagerEnteredEditMode(): void;
Returns
_onTextManagerExitedEditMode()
Declaration
protected _onTextManagerExitedEditMode(): void;
Returns
_pathToTextWhizzPath(path)
Declaration
protected _pathToTextWhizzPath(path: Path): TextWhizz.Path;
Parameters
| Type |
Name |
Description |
| Path |
path |
|
Returns
| Type |
Description |
| TextWhizz.Path |
|
_setDataItem(itemData, itemHandlerData)
Declaration
protected _setDataItem(itemData: BaseTextItem, itemHandlerData: any): void;
Parameters
| Type |
Name |
Description |
| BaseTextItem |
itemData |
|
| any |
itemHandlerData |
|
Returns
_transformText(transform)
Declaration
protected _transformText(transform: Transform): void;
Parameters
Returns
_updateImpl(beforeUpdate, afterUpdate, trigger)
Declaration
protected _updateImpl(beforeUpdate?: Function, afterUpdate?: Function, trigger?: string): Promise<void>;
Parameters
| Type |
Name |
Description |
| Function |
beforeUpdate |
|
| Function |
afterUpdate |
|
| string |
trigger |
|
Returns
| Type |
Description |
| Promise<void> |
|
applyInlineStyle(style)
Declaration
applyInlineStyle(style: IInlineStyle): void;
Parameters
Returns
applyParagraphStyle(paragraphStyle)
Declaration
applyParagraphStyle(paragraphStyle: IParagraphStyle): void;
Parameters
Returns
clearImageContainer()
Declaration
clearImageContainer(): void;
Returns
dispose()
Declaration
Returns
drawItemHandler(itemHandlerCtx)
Declaration
drawItemHandler(itemHandlerCtx: CanvasRenderingContext2D): void;
Parameters
| Type |
Name |
Description |
| CanvasRenderingContext2D |
itemHandlerCtx |
|
Returns
enterEditMode()
Declaration
enterEditMode(): Promise<void>;
Returns
| Type |
Description |
| Promise<void> |
|
exitEditMode(stayActive)
Declaration
exitEditMode(stayActive?: boolean): Promise<void>;
Parameters
| Type |
Name |
Description |
| boolean |
stayActive |
|
Returns
| Type |
Description |
| Promise<void> |
|
frontEndUpdate(beforeUpdate, afterUpdate, trigger)
Declaration
frontEndUpdate(beforeUpdate?: Function, afterUpdate?: Function, trigger?: string): Promise<void>;
Parameters
| Type |
Name |
Description |
| Function |
beforeUpdate |
|
| Function |
afterUpdate |
|
| string |
trigger |
|
Returns
| Type |
Description |
| Promise<void> |
|
getFonts()
Declaration
Returns
| Type |
Description |
| string[] |
|
getFramesData()
Declaration
abstract getFramesData(): ITextFrameData;
Returns
| Type |
Description |
| IFontRegistry |
|
getTextForRendering()
Declaration
getTextForRendering(): string;
Returns
getWrappingPathData()
Declaration
abstract getWrappingPathData(): IWrappingPathData;
Returns
| Type |
Description |
| IFontRegistry |
|
isEmpty()
Declaration
Returns
isEmptyTextPlaceholder()
Declaration
isEmptyTextPlaceholder(): any;
Returns
isHighlightNeeded()
Declaration
isHighlightNeeded(): boolean;
Returns
onTextWhizzInit()
Declaration
Returns
processInPlaceEditingKeyEvent(e)
Declaration
processInPlaceEditingKeyEvent(e: IKeyboardEventParams): Promise<boolean>;
Parameters
| Type |
Name |
Description |
| IKeyboardEventParams |
e |
|
Returns
| Type |
Description |
| Promise<boolean> |
|
processInPlaceEditingMouseEvent(e, mouseOverCurrent)
Declaration
processInPlaceEditingMouseEvent(e: IPointerParams, mouseOverCurrent: boolean): Promise<boolean>;
Parameters
| Type |
Name |
Description |
| IPointerParams |
e |
|
| boolean |
mouseOverCurrent |
|
Returns
| Type |
Description |
| Promise<boolean> |
|
quickUpdate()
Declaration
Returns
redrawActiveText()
Declaration
redrawActiveText(): void;
Returns
renderFill(itemHandlerCtx, opacityMultiplier)
Declaration
protected renderFill(itemHandlerCtx: CanvasRenderingContext2D, opacityMultiplier: number): void;
Parameters
| Type |
Name |
Description |
| CanvasRenderingContext2D |
itemHandlerCtx |
|
| number |
opacityMultiplier |
|
Returns
renderStroke(itemHandlerCtx, opacityMultiplier)
Declaration
protected renderStroke(itemHandlerCtx: CanvasRenderingContext2D, opacityMultiplier: number): void;
Parameters
| Type |
Name |
Description |
| CanvasRenderingContext2D |
itemHandlerCtx |
|
| number |
opacityMultiplier |
|
Returns
setRectangle(rectangle, supressOnChanged)
Declaration
setRectangle(rectangle: RotatedRectangleF, supressOnChanged?: boolean): void;
Parameters
Returns
setTextWhizzModule(textWhizz, fontRegistry)
Declaration
setTextWhizzModule(textWhizz: typeof TextWhizz, fontRegistry: FontRegistry): void;
Parameters
| Type |
Name |
Description |
| typeof TextWhizz |
textWhizz |
|
| FontRegistry |
fontRegistry |
|
Returns
setTextWhizzWrappingPath(handler)
Declaration
abstract setTextWhizzWrappingPath(handler: TextWhizz.TextHandler): void;
Parameters
| Type |
Name |
Description |
| TextWhizz.TextHandler |
handler |
|
Returns
update(beforeUpdate, afterUpdate, trigger)
Declaration
update(beforeUpdate?: Function, afterUpdate?: Function, trigger?: string): void;
Parameters
| Type |
Name |
Description |
| Function |
beforeUpdate |
|
| Function |
afterUpdate |
|
| string |
trigger |
|
Returns
updateAsync(beforeUpdate, afterUpdate, trigger)
Declaration
updateAsync(beforeUpdate?: Function, afterUpdate?: Function, trigger?: string): Promise<void>;
Parameters
| Type |
Name |
Description |
| Function |
beforeUpdate |
|
| Function |
afterUpdate |
|
| string |
trigger |
|
Returns
| Type |
Description |
| Promise<void> |
|
updateRectangle(rectangle, updateFromTextEdit)
Declaration
updateRectangle(rectangle: RectangleF, updateFromTextEdit: boolean): void;
Parameters
| Type |
Name |
Description |
| RectangleF |
rectangle |
|
| boolean |
updateFromTextEdit |
|
Returns
updateText(text)
Declaration
updateText(text: string): void;
Parameters
| Type |
Name |
Description |
| string |
text |
|
Returns
waitInitFrontEndRendering()
Declaration
protected waitInitFrontEndRendering(): Promise<void>;
Returns
| Type |
Description |
| Promise<void> |
|
waitUpdate()
Declaration
waitUpdate(): Promise<void>;
Returns
| Type |
Description |
| Promise<void> |
|