Back to Website
Show / Hide Table of Contents

Class PlaceholderItemHandler

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

Constructors

(constructor)(item, textWhizz, apiClient, colorPreviewService, options)

Constructs a new instance of the PlaceholderItemHandler class

Declaration
constructor(item?: PlaceholderItem, textWhizz?: typeof TextWhizz, apiClient?: IDesignAtomsApiClient, colorPreviewService?: IListenableColorPreviewService, options?: IPlaceholderHandlerOptions);
Parameters
Type Name Description
PlaceholderItem item
typeof TextWhizz textWhizz
IDesignAtomsApiClient apiClient
IListenableColorPreviewService colorPreviewService
IPlaceholderHandlerOptions options

Properties

_bottomFrames

Declaration
protected _bottomFrames: ContentItemHandler[];
Property Value
Type Description
ContentItemHandler[]

_content

Declaration
protected _content: ContentItemHandler;
Property Value
Type Description
ContentItemHandler

_doneButton

Declaration
protected _doneButton: HTMLElement;
Property Value
Type Description
HTMLElement

_doneButtonGroup

Declaration
protected _doneButtonGroup: HTMLElement;
Property Value
Type Description
HTMLElement

_editButtonGroup

Declaration
protected _editButtonGroup: HTMLElement;
Property Value
Type Description
HTMLElement

_editing

Declaration
protected _editing: boolean;
Property Value
Type Description
boolean

_emptyPlaceholderBorderColor

Declaration
protected _emptyPlaceholderBorderColor: RgbColor;
Property Value
Type Description
RgbColor

_emptyPlaceholderBorderWidth

Declaration
protected _emptyPlaceholderBorderWidth: number;
Property Value
Type Description
number

_fitModeType

Declaration
protected _fitModeType: PlaceholderFitModeType;
Property Value
Type Description
PlaceholderFitModeType

_forceQualityChangeInfoBar

Declaration
protected _forceQualityChangeInfoBar: boolean;
Property Value
Type Description
boolean

_handleButton

Declaration
protected _handleButton: HTMLElement;
Property Value
Type Description
HTMLElement

_imageIsLoading

Declaration
protected _imageIsLoading: boolean;
Property Value
Type Description
boolean

_isContentUpdating

Declaration
protected _isContentUpdating: boolean;
Property Value
Type Description
boolean

_isCropMode

Declaration
protected _isCropMode: boolean;
Property Value
Type Description
boolean

_placeholderButtonGroup

Declaration
protected _placeholderButtonGroup: HTMLElement;
Property Value
Type Description
HTMLElement

_qualityChangeContainer

Declaration
protected _qualityChangeContainer: HTMLElement;
Property Value
Type Description
HTMLElement

_qualityChangeInfoBar

Declaration
protected _qualityChangeInfoBar: HTMLElement;
Property Value
Type Description
HTMLElement

_qualityChangeScaleBar

Declaration
protected _qualityChangeScaleBar: HTMLElement;
Property Value
Type Description
HTMLElement

_selectButton

Declaration
protected _selectButton: HTMLElement;
Property Value
Type Description
HTMLElement

_selectButtonClickHandler

Declaration
protected _selectButtonClickHandler: (event: any) => void;
Property Value
Type Description
(event: any) => void

_showMaskedContent

Declaration
protected _showMaskedContent: boolean;
Property Value
Type Description
boolean

_topFrames

Declaration
protected _topFrames: ContentItemHandler[];
Property Value
Type Description
ContentItemHandler[]

bottomFrames

Declaration
get bottomFrames(): ContentItemHandler[];

set bottomFrames(v: ContentItemHandler[]);
Property Value
Type Description
ContentItemHandler[]

content

Declaration
get content(): ContentItemHandler;

set content(value: ContentItemHandler);
Property Value
Type Description
ContentItemHandler

currentRectangle

Declaration
currentRectangle: RotatedRectangleF;
Property Value
Type Description
RotatedRectangleF

doneButton

Declaration
get doneButton(): HTMLElement;

set doneButton(v: HTMLElement);
Property Value
Type Description
HTMLElement

doneButtonGroup

Declaration
get doneButtonGroup(): HTMLElement;

set doneButtonGroup(v: HTMLElement);
Property Value
Type Description
HTMLElement

editButtonGroup

Declaration
get editButtonGroup(): HTMLElement;

set editButtonGroup(v: HTMLElement);
Property Value
Type Description
HTMLElement

editing

Declaration
get editing(): boolean;

set editing(value: boolean);
Property Value
Type Description
boolean

forceQualityChangeInfoBar

Declaration
get forceQualityChangeInfoBar(): boolean;

set forceQualityChangeInfoBar(v: boolean);
Property Value
Type Description
boolean

handleButton

Declaration
get handleButton(): HTMLElement;

set handleButton(v: HTMLElement);
Property Value
Type Description
HTMLElement

imageIsLoading

Declaration
get imageIsLoading(): boolean;

set imageIsLoading(condition: boolean);
Property Value
Type Description
boolean

isCropMode

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

isQualityChangeBarEmpty

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

item

Declaration
get item(): PlaceholderItem;

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

onDoneButtonClick

Declaration
onDoneButtonClick: () => void;
Property Value
Type Description
() => void

onHandleButtonClick

Declaration
onHandleButtonClick: () => void;
Property Value
Type Description
() => void

placeholderButtonGroup

Declaration
get placeholderButtonGroup(): HTMLElement;

set placeholderButtonGroup(v: HTMLElement);
Property Value
Type Description
HTMLElement

previousRectangle

Declaration
get previousRectangle(): RotatedRectangleF;

set previousRectangle(value: RotatedRectangleF);
Property Value
Type Description
RotatedRectangleF

qualityChangeContainer

Declaration
get qualityChangeContainer(): HTMLElement;

set qualityChangeContainer(v: HTMLElement);
Property Value
Type Description
HTMLElement

qualityChangeInfoBar

Declaration
get qualityChangeInfoBar(): HTMLElement;

set qualityChangeInfoBar(v: HTMLElement);
Property Value
Type Description
HTMLElement

qualityChangeScaleBar

Declaration
get qualityChangeScaleBar(): HTMLElement;

set qualityChangeScaleBar(v: HTMLElement);
Property Value
Type Description
HTMLElement

selectButton

Declaration
get selectButton(): HTMLElement;

set selectButton(v: HTMLElement);
Property Value
Type Description
HTMLElement

selectButtonClickHandler

Declaration
get selectButtonClickHandler(): (event: any) => void;
Property Value
Type Description
(event: any) => void

showMaskedContent

Declaration
get showMaskedContent(): boolean;

set showMaskedContent(value: boolean);
Property Value
Type Description
boolean

topFrames

Declaration
get topFrames(): ContentItemHandler[];

set topFrames(v: ContentItemHandler[]);
Property Value
Type Description
ContentItemHandler[]

typeName

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

Methods

_createDataInstance(itemHandler)

Declaration
protected _createDataInstance(itemHandler?: PlaceholderItemHandler): PlaceholderHandlerData;
Parameters
Type Name Description
PlaceholderItemHandler itemHandler
Returns
Type Description
PlaceholderHandlerData

_endTransform(changed, resized, suppressOnChanged)

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

_getColors()

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

_getDefaultPermissions()

Declaration
protected _getDefaultPermissions(): IPermissions;
Returns
Type Description
IPermissions

_getHighlightRectangle()

Declaration
protected _getHighlightRectangle(): RotatedRectangleF;
Returns
Type Description
RotatedRectangleF

_getItemPermissions()

Declaration
protected _getItemPermissions(): IPermissions;
Returns
Type Description
IPermissions

_isReady()

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

_onAddedOnCanvas(canvas)

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

_onItemPropertyChanged(sender, propertyName)

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

_onItemVisibilityChanged()

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

_onRemovedFromCanvas(canvas)

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

_onTransformRectangle(startRectangle, endRectangle, highlightOnly)

Declaration
protected _onTransformRectangle(startRectangle: RotatedRectangleF, endRectangle: RotatedRectangleF, highlightOnly: boolean): void;
Parameters
Type Name Description
RotatedRectangleF startRectangle
RotatedRectangleF endRectangle
boolean highlightOnly
Returns
Type Description
void

_refreshState()

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

_updateImpl()

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

addIsEditingChanged(listener)

Declaration
addIsEditingChanged(listener: (ph: PlaceholderItemHandler) => void): void;
Parameters
Type Name Description
(ph: PlaceholderItemHandler) => void listener
Returns
Type Description
void

addSelectButtonClick(handler)

Declaration
addSelectButtonClick(handler: (handler: PlaceholderItemHandler) => void): void;
Parameters
Type Name Description
(handler: PlaceholderItemHandler) => void handler
Returns
Type Description
void

drawItemHandler(itemHandlerCtx)

Declaration
drawItemHandler(itemHandlerCtx: CanvasRenderingContext2D): void;
Parameters
Type Name Description
CanvasRenderingContext2D itemHandlerCtx
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

getBorderMargin()

Declaration
getBorderMargin(): number;
Returns
Type Description
number

getBottomFrame(index)

Declaration
getBottomFrame(index: number): ContentItemHandler;
Parameters
Type Name Description
number index
Returns
Type Description
ContentItemHandler

getBoundsIncludingFrames()

Declaration
getBoundsIncludingFrames(): RectangleF;
Returns
Type Description
RectangleF

getChangeContentButtonClickEvent()

Declaration
getChangeContentButtonClickEvent(): EventWithSenderArg<ItemHandler, any>;
Returns
Type Description
EventWithSenderArg<ItemHandler, any>

getContentScale()

Declaration
getContentScale(): number;
Returns
Type Description
number

getPermissions(forcePermissionContent)

Declaration
getPermissions(forcePermissionContent?: boolean): Permission;
Parameters
Type Name Description
boolean forcePermissionContent
Returns
Type Description
Permission

getRectangleIncludingFrames()

Declaration
getRectangleIncludingFrames(): RotatedRectangleF;
Returns
Type Description
RotatedRectangleF

getSelectionRectangle()

Declaration
getSelectionRectangle(): RotatedRectangleF;
Returns
Type Description
RotatedRectangleF

getSelectToolbarButtonClickEvent()

Declaration
getSelectToolbarButtonClickEvent(): EventWithSenderArg<ItemHandler, any>;
Returns
Type Description
EventWithSenderArg<ItemHandler, any>

getTopFrame(index)

Declaration
getTopFrame(index: number): ContentItemHandler;
Parameters
Type Name Description
number index
Returns
Type Description
ContentItemHandler

isContentUpdating()

Declaration
isContentUpdating(): boolean;
Returns
Type Description
boolean

isCoverMode()

Declaration
isCoverMode(): boolean;
Returns
Type Description
boolean

isEmptyContent()

Declaration
isEmptyContent(): boolean;
Returns
Type Description
boolean

isHighlightNeeded()

Declaration
isHighlightNeeded(): boolean;
Returns
Type Description
boolean

isStubOrEmpty()

Declaration
isStubOrEmpty(): boolean;
Returns
Type Description
boolean

onResized()

Declaration
onResized(): boolean;
Returns
Type Description
boolean

quickUpdate()

Declaration
quickUpdate(): void;
Returns
Type Description
void

removeIsEditingChanged(listener)

Declaration
removeIsEditingChanged(listener: (ph: PlaceholderItemHandler) => void): void;
Parameters
Type Name Description
(ph: PlaceholderItemHandler) => void listener
Returns
Type Description
void

removeSelectButtonClick(handler)

Declaration
removeSelectButtonClick(handler: (handler: PlaceholderItemHandler) => void): void;
Parameters
Type Name Description
(handler: PlaceholderItemHandler) => void handler
Returns
Type Description
void

resetContent()

Declaration
resetContent(): void;
Returns
Type Description
void

rotateContentLeft()

Declaration
rotateContentLeft(): void;
Returns
Type Description
void

rotateContentRight()

Declaration
rotateContentRight(): void;
Returns
Type Description
void

setBadToGoodChangeScaleBarClass()

Declaration
setBadToGoodChangeScaleBarClass(): void;
Returns
Type Description
void

setBadToWarningChangeScaleBarClass()

Declaration
setBadToWarningChangeScaleBarClass(): void;
Returns
Type Description
void

setBottomFrame(index, v)

Declaration
setBottomFrame(index: any, v: any): void;
Parameters
Type Name Description
any index
any v
Returns
Type Description
void

setContentScale(value)

Declaration
setContentScale(value: number): void;
Parameters
Type Name Description
number value
Returns
Type Description
void

setContentUpdating(v)

Declaration
setContentUpdating(v: boolean): void;
Parameters
Type Name Description
boolean v
Returns
Type Description
void

setQualityChangeInfoBarText(value)

Declaration
setQualityChangeInfoBarText(value: string): void;
Parameters
Type Name Description
string value
Returns
Type Description
void

setQualityChangeScaleBarWidth(progress)

Declaration
setQualityChangeScaleBarWidth(progress: number): void;
Parameters
Type Name Description
number progress
Returns
Type Description
void

setRectangle(rectangle, suppressOnChanged, forcePlaceholderSet)

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

setTopFrame(index, v)

Declaration
setTopFrame(index: number, v: any): void;
Parameters
Type Name Description
number index
any v
Returns
Type Description
void

setWarningToGoodChangeScaleBarClass()

Declaration
setWarningToGoodChangeScaleBarClass(): void;
Returns
Type Description
void

showEditButton()

Declaration
showEditButton(): boolean;
Returns
Type Description
boolean

showHandleButton()

Declaration
showHandleButton(): boolean;
Returns
Type Description
boolean

showHandleToolbarButton()

Declaration
showHandleToolbarButton(): boolean;
Returns
Type Description
boolean

showSelectButton()

Declaration
showSelectButton(): boolean;
Returns
Type Description
boolean

showSelectToolbarButton()

Declaration
showSelectToolbarButton(): boolean;
Returns
Type Description
boolean

startTransform()

Declaration
startTransform(): void;
Returns
Type Description
void

transformChanged()

Declaration
transformChanged(): void;
Returns
Type Description
void

updateContentAndFrames(func)

Declaration
updateContentAndFrames(func: (itemHandler: ContentItemHandler) => void): void;
Parameters
Type Name Description
(itemHandler: ContentItemHandler) => void func
Returns
Type Description
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