Back to Website
Show / Hide Table of Contents

Class NewBaseTextItemHandler

Inheritance
ItemHandler
BaseRectangleItemHandler
ShapeItemHandler
NewBaseTextItemHandler
Package: @aurigma/design-atoms

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
Type Name Description
FontRegistry fontRegistry
ITextEditorControllerFactory textEditorControllerFactory
BaseTextItem item
typeof TextWhizz textWhizz
IDesignAtomsApiClient apiClient
IListenableColorPreviewService colorPreviewService
IColorParser colorParser

Properties

_colorParser

Declaration
protected _colorParser: IColorParser;
Property Value
Type Description
IColorParser

_enteredEditModeEvent

Declaration
protected readonly _enteredEditModeEvent: EventWithSenderArg<unknown, unknown>;
Property Value
Type Description
EventWithSenderArg<unknown, unknown>

_exitedEditModeEvent

Declaration
protected readonly _exitedEditModeEvent: EventWithSenderArg<unknown, unknown>;
Property Value
Type Description
EventWithSenderArg<unknown, unknown>

_staticTextRect

Declaration
protected _staticTextRect: RectangleF;
Property Value
Type Description
RectangleF

_textEditorController

Declaration
protected _textEditorController: ITextEditorController;
Property Value
Type Description
ITextEditorController

colorPreviewService

Declaration
get colorPreviewService(): IListenableColorPreviewService;
Property Value
Type Description
IListenableColorPreviewService

editing

Declaration
get editing(): boolean;
Property Value
Type Description
boolean

enteredEditModeEvent

Declaration
get enteredEditModeEvent(): EventWithSenderArg<unknown, unknown>;
Property Value
Type Description
EventWithSenderArg<unknown, unknown>

exitedEditModeEvent

Declaration
get exitedEditModeEvent(): EventWithSenderArg<unknown, unknown>;
Property Value
Type Description
EventWithSenderArg<unknown, unknown>

frontEndRenderingReady

Declaration
get frontEndRenderingReady(): boolean;
Property Value
Type Description
boolean

inPlaceEditingEnabled

Declaration
get inPlaceEditingEnabled(): boolean;
Property Value
Type Description
boolean

isInEdit

Declaration
get isInEdit(): boolean;
Property Value
Type Description
boolean

item

Declaration
get item(): BaseTextItem;

set item(item: BaseTextItem);
Property Value
Type Description
BaseTextItem

textCropped

Declaration
get textCropped(): boolean;
Property Value
Type Description
boolean

textEditor

Declaration
get textEditor(): ITextEditor;
Property Value
Type Description
IFontRegistry

textEditorController

Declaration
get textEditorController(): ITextEditorController;
Property Value
Type Description
ITextEditorController

typeName

Declaration
static readonly typeName: string;
Property Value
Type Description
string

Methods

_applyTransform(item, transform, center)

Declaration
protected abstract _applyTransform(item: BaseTextItem, transform: Transform, center: PointF): void;
Parameters
Type Name Description
BaseTextItem item
Transform transform
PointF center
Returns
Type Description
void

_createDataInstance(itemHandler)

Declaration
protected _createDataInstance(itemHandler?: ShapeItemHandler): ShapeHandlerData;
Parameters
Type Name Description
ShapeItemHandler itemHandler
Returns
Type Description
ShapeHandlerData

_drawHandlerEffects(ctx)

Declaration
protected _drawHandlerEffects(ctx: CanvasRenderingContext2D): void;
Parameters
Type Name Description
CanvasRenderingContext2D ctx
Returns
Type Description
void

_endTransform(changed, resized)

Declaration
_endTransform(changed: boolean, resized: boolean): void;
Parameters
Type Name Description
boolean changed
boolean resized
Returns
Type Description
void

_getBaselineDrawStates()

Declaration
protected _getBaselineDrawStates(): ItemHandlerState[];
Returns
Type Description
ItemHandlerState[]

_getBoundsMargin()

Declaration
protected _getBoundsMargin(): number;
Returns
Type Description
number

_getColors()

Declaration
protected _getColors(): Color[];
Returns
Type Description
Color[]

_getCurrentState()

Declaration
protected _getCurrentState(): ItemHandlerState;
Returns
Type Description
ItemHandlerState

_getEndTransformTrigger(resized)

Declaration
protected _getEndTransformTrigger(resized: boolean): string;
Parameters
Type Name Description
boolean resized
Returns
Type Description
string

_getPreviewScaleLimits()

Declaration
protected _getPreviewScaleLimits(): {
        min: number;
        max: number;
    };
Returns
Type Description
{ min: number; max: number; }

_isReady()

Declaration
protected _isReady(): boolean;
Returns
Type Description
boolean

_needToDrawBaseline()

Declaration
protected _needToDrawBaseline(): boolean;
Returns
Type Description
boolean

_onAddedOnCanvas(canvas)

Declaration
protected _onAddedOnCanvas(canvas: ICanvas): void;
Parameters
Type Name Description
ICanvas canvas
Returns
Type Description
void

_onFrontEndRenderingInitialized()

Declaration
protected _onFrontEndRenderingInitialized(): void;
Returns
Type Description
void

_onItemPropertyChanged(sender, propertyName)

Declaration
protected _onItemPropertyChanged(sender: BaseTextItem, propertyName: string): void;
Parameters
Type Name Description
BaseTextItem sender
string propertyName
Returns
Type Description
void

_onItemVisibilityChanged()

Declaration
protected _onItemVisibilityChanged(): void;
Returns
Type Description
void

_onRemovedFromCanvas(canvas)

Declaration
protected _onRemovedFromCanvas(canvas: any): void;
Parameters
Type Name Description
any canvas
Returns
Type Description
void

_onTextManagerEnteredEditMode()

Declaration
protected _onTextManagerEnteredEditMode(): void;
Returns
Type Description
void

_onTextManagerExitedEditMode()

Declaration
protected _onTextManagerExitedEditMode(): void;
Returns
Type Description
void

_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
Type Description
void

_transformText(transform)

Declaration
protected _transformText(transform: Transform): void;
Parameters
Type Name Description
Transform transform
Returns
Type Description
void

_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
Type Name Description
IInlineStyle style
Returns
Type Description
void

applyParagraphStyle(paragraphStyle)

Declaration
applyParagraphStyle(paragraphStyle: IParagraphStyle): void;
Parameters
Type Name Description
IParagraphStyle paragraphStyle
Returns
Type Description
void

clearImageContainer()

Declaration
clearImageContainer(): void;
Returns
Type Description
void

dispose()

Declaration
dispose(): void;
Returns
Type Description
void

drawItemHandler(itemHandlerCtx)

Declaration
drawItemHandler(itemHandlerCtx: CanvasRenderingContext2D): void;
Parameters
Type Name Description
CanvasRenderingContext2D itemHandlerCtx
Returns
Type Description
void

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
getFonts(): string[];
Returns
Type Description
string[]

getFramesData()

Declaration
abstract getFramesData(): ITextFrameData;
Returns
Type Description
IFontRegistry

getTextForRendering()

Declaration
getTextForRendering(): string;
Returns
Type Description
string

getWrappingPathData()

Declaration
abstract getWrappingPathData(): IWrappingPathData;
Returns
Type Description
IFontRegistry

isEmpty()

Declaration
isEmpty(): boolean;
Returns
Type Description
boolean

isEmptyTextPlaceholder()

Declaration
isEmptyTextPlaceholder(): any;
Returns
Type Description
any

isHighlightNeeded()

Declaration
isHighlightNeeded(): boolean;
Returns
Type Description
boolean

onTextWhizzInit()

Declaration
onTextWhizzInit(): void;
Returns
Type Description
void

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
quickUpdate(): void;
Returns
Type Description
void

redrawActiveText()

Declaration
redrawActiveText(): void;
Returns
Type Description
void

renderFill(itemHandlerCtx, opacityMultiplier)

Declaration
protected renderFill(itemHandlerCtx: CanvasRenderingContext2D, opacityMultiplier: number): void;
Parameters
Type Name Description
CanvasRenderingContext2D itemHandlerCtx
number opacityMultiplier
Returns
Type Description
void

renderStroke(itemHandlerCtx, opacityMultiplier)

Declaration
protected renderStroke(itemHandlerCtx: CanvasRenderingContext2D, opacityMultiplier: number): void;
Parameters
Type Name Description
CanvasRenderingContext2D itemHandlerCtx
number opacityMultiplier
Returns
Type Description
void

setRectangle(rectangle, supressOnChanged)

Declaration
setRectangle(rectangle: RotatedRectangleF, supressOnChanged?: boolean): void;
Parameters
Type Name Description
RotatedRectangleF rectangle
boolean supressOnChanged
Returns
Type Description
void

setTextWhizzModule(textWhizz, fontRegistry)

Declaration
setTextWhizzModule(textWhizz: typeof TextWhizz, fontRegistry: FontRegistry): void;
Parameters
Type Name Description
typeof TextWhizz textWhizz
FontRegistry fontRegistry
Returns
Type Description
void

setTextWhizzWrappingPath(handler)

Declaration
abstract setTextWhizzWrappingPath(handler: TextWhizz.TextHandler): void;
Parameters
Type Name Description
TextWhizz.TextHandler handler
Returns
Type Description
void

update(beforeUpdate, afterUpdate, trigger)

Declaration
update(beforeUpdate?: Function, afterUpdate?: Function, trigger?: string): void;
Parameters
Type Name Description
Function beforeUpdate
Function afterUpdate
string trigger
Returns
Type Description
void

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
Type Description
void

updateText(text)

Declaration
updateText(text: string): void;
Parameters
Type Name Description
string text
Returns
Type Description
void

waitInitFrontEndRendering()

Declaration
protected waitInitFrontEndRendering(): Promise<void>;
Returns
Type Description
Promise<void>

waitUpdate()

Declaration
waitUpdate(): Promise<void>;
Returns
Type Description
Promise<void>
Was this page helpful?
Thanks for your feedback!
Back to top Copyright © 2001–2025 Aurigma, Inc. All rights reserved.
Loading...
    Thank for your vote
    Your opinion is important to us. To provide details, send feedback.
    Send feedback