Class PlaceholderItemHandler
Inheritance
PlaceholderItemHandler
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
Properties
_bottomFrames
Declaration
protected _bottomFrames: ContentItemHandler[];
Property Value
_content
Declaration
protected _content: ContentItemHandler;
Property Value
Declaration
protected _doneButton: HTMLElement;
Property Value
| Type |
Description |
| HTMLElement |
|
Declaration
protected _doneButtonGroup: HTMLElement;
Property Value
| Type |
Description |
| HTMLElement |
|
Declaration
protected _editButtonGroup: HTMLElement;
Property Value
| Type |
Description |
| HTMLElement |
|
_editing
Declaration
protected _editing: boolean;
Property Value
_emptyPlaceholderBorderColor
Declaration
protected _emptyPlaceholderBorderColor: RgbColor;
Property Value
_emptyPlaceholderBorderWidth
Declaration
protected _emptyPlaceholderBorderWidth: number;
Property Value
_fitModeType
Declaration
protected _fitModeType: PlaceholderFitModeType;
Property Value
_forceQualityChangeInfoBar
Declaration
protected _forceQualityChangeInfoBar: boolean;
Property Value
Declaration
protected _handleButton: HTMLElement;
Property Value
| Type |
Description |
| HTMLElement |
|
_imageIsLoading
Declaration
protected _imageIsLoading: boolean;
Property Value
_isContentUpdating
Declaration
protected _isContentUpdating: boolean;
Property Value
_isCropMode
Declaration
protected _isCropMode: boolean;
Property Value
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 |
|
Declaration
protected _selectButton: HTMLElement;
Property Value
| Type |
Description |
| HTMLElement |
|
Declaration
protected _selectButtonClickHandler: (event: any) => void;
Property Value
| Type |
Description |
| (event: any) => void |
|
_showMaskedContent
Declaration
protected _showMaskedContent: boolean;
Property Value
_topFrames
Declaration
protected _topFrames: ContentItemHandler[];
Property Value
bottomFrames
Declaration
get bottomFrames(): ContentItemHandler[];
set bottomFrames(v: ContentItemHandler[]);
Property Value
content
Declaration
get content(): ContentItemHandler;
set content(value: ContentItemHandler);
Property Value
currentRectangle
Declaration
currentRectangle: RotatedRectangleF;
Property Value
Declaration
get doneButton(): HTMLElement;
set doneButton(v: HTMLElement);
Property Value
| Type |
Description |
| HTMLElement |
|
Declaration
get doneButtonGroup(): HTMLElement;
set doneButtonGroup(v: HTMLElement);
Property Value
| Type |
Description |
| HTMLElement |
|
Declaration
get editButtonGroup(): HTMLElement;
set editButtonGroup(v: HTMLElement);
Property Value
| Type |
Description |
| HTMLElement |
|
editing
Declaration
get editing(): boolean;
set editing(value: boolean);
Property Value
forceQualityChangeInfoBar
Declaration
get forceQualityChangeInfoBar(): boolean;
set forceQualityChangeInfoBar(v: boolean);
Property Value
Declaration
get handleButton(): HTMLElement;
set handleButton(v: HTMLElement);
Property Value
| Type |
Description |
| HTMLElement |
|
imageIsLoading
Declaration
get imageIsLoading(): boolean;
set imageIsLoading(condition: boolean);
Property Value
isCropMode
Declaration
get isCropMode(): boolean;
Property Value
isQualityChangeBarEmpty
Declaration
get isQualityChangeBarEmpty(): boolean;
Property Value
item
Declaration
get item(): PlaceholderItem;
set item(item: PlaceholderItem);
Property Value
Declaration
onDoneButtonClick: () => void;
Property Value
| Type |
Description |
| () => void |
|
Declaration
onHandleButtonClick: () => void;
Property Value
| Type |
Description |
| () => void |
|
Declaration
get placeholderButtonGroup(): HTMLElement;
set placeholderButtonGroup(v: HTMLElement);
Property Value
| Type |
Description |
| HTMLElement |
|
previousRectangle
Declaration
get previousRectangle(): RotatedRectangleF;
set previousRectangle(value: RotatedRectangleF);
Property Value
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 |
|
Declaration
get selectButton(): HTMLElement;
set selectButton(v: HTMLElement);
Property Value
| Type |
Description |
| HTMLElement |
|
Declaration
get selectButtonClickHandler(): (event: any) => void;
Property Value
| Type |
Description |
| (event: any) => void |
|
showMaskedContent
Declaration
get showMaskedContent(): boolean;
set showMaskedContent(value: boolean);
Property Value
topFrames
Declaration
get topFrames(): ContentItemHandler[];
set topFrames(v: ContentItemHandler[]);
Property Value
typeName
Declaration
static readonly typeName: string;
Property Value
Methods
_createDataInstance(itemHandler)
Declaration
protected _createDataInstance(itemHandler?: PlaceholderItemHandler): PlaceholderHandlerData;
Parameters
Returns
Declaration
protected _endTransform(changed: boolean, resized: boolean, suppressOnChanged?: boolean): void;
Parameters
| Type |
Name |
Description |
| boolean |
changed |
|
| boolean |
resized |
|
| boolean |
suppressOnChanged |
|
Returns
_getColors()
Declaration
protected _getColors(): Color[];
Returns
_getDefaultPermissions()
Declaration
protected _getDefaultPermissions(): IPermissions;
Returns
_getHighlightRectangle()
Declaration
protected _getHighlightRectangle(): RotatedRectangleF;
Returns
_getItemPermissions()
Declaration
protected _getItemPermissions(): IPermissions;
Returns
_isReady()
Declaration
protected _isReady(): boolean;
Returns
_onAddedOnCanvas(canvas)
Declaration
protected _onAddedOnCanvas(canvas: ICanvas): void;
Parameters
| Type |
Name |
Description |
| ICanvas |
canvas |
|
Returns
_onItemPropertyChanged(sender, propertyName)
Declaration
protected _onItemPropertyChanged(sender: PlaceholderItem, propertyName: string): void;
Parameters
Returns
_onItemVisibilityChanged()
Declaration
protected _onItemVisibilityChanged(): void;
Returns
_onRemovedFromCanvas(canvas)
Declaration
protected _onRemovedFromCanvas(canvas: ICanvas): void;
Parameters
| Type |
Name |
Description |
| ICanvas |
canvas |
|
Returns
Declaration
protected _onTransformRectangle(startRectangle: RotatedRectangleF, endRectangle: RotatedRectangleF, highlightOnly: boolean): void;
Parameters
Returns
_refreshState()
Declaration
protected _refreshState(): void;
Returns
_updateImpl()
Declaration
protected _updateImpl(): Promise<void>;
Returns
| Type |
Description |
| Promise<void> |
|
addIsEditingChanged(listener)
Declaration
addIsEditingChanged(listener: (ph: PlaceholderItemHandler) => void): void;
Parameters
Returns
Declaration
addSelectButtonClick(handler: (handler: PlaceholderItemHandler) => void): void;
Parameters
Returns
drawItemHandler(itemHandlerCtx)
Declaration
drawItemHandler(itemHandlerCtx: CanvasRenderingContext2D): void;
Parameters
| Type |
Name |
Description |
| CanvasRenderingContext2D |
itemHandlerCtx |
|
Returns
Declaration
endTransform(changed: boolean, resized: boolean): void;
Parameters
| Type |
Name |
Description |
| boolean |
changed |
|
| boolean |
resized |
|
Returns
getBorderMargin()
Declaration
getBorderMargin(): number;
Returns
getBottomFrame(index)
Declaration
getBottomFrame(index: number): ContentItemHandler;
Parameters
| Type |
Name |
Description |
| number |
index |
|
Returns
getBoundsIncludingFrames()
Declaration
getBoundsIncludingFrames(): RectangleF;
Returns
getChangeContentButtonClickEvent()
Declaration
getChangeContentButtonClickEvent(): EventWithSenderArg<ItemHandler, any>;
Returns
getContentScale()
Declaration
getContentScale(): number;
Returns
getPermissions(forcePermissionContent)
Declaration
getPermissions(forcePermissionContent?: boolean): Permission;
Parameters
| Type |
Name |
Description |
| boolean |
forcePermissionContent |
|
Returns
getRectangleIncludingFrames()
Declaration
getRectangleIncludingFrames(): RotatedRectangleF;
Returns
getSelectionRectangle()
Declaration
getSelectionRectangle(): RotatedRectangleF;
Returns
Declaration
getSelectToolbarButtonClickEvent(): EventWithSenderArg<ItemHandler, any>;
Returns
getTopFrame(index)
Declaration
getTopFrame(index: number): ContentItemHandler;
Parameters
| Type |
Name |
Description |
| number |
index |
|
Returns
isContentUpdating()
Declaration
isContentUpdating(): boolean;
Returns
isCoverMode()
Declaration
Returns
isEmptyContent()
Declaration
isEmptyContent(): boolean;
Returns
isHighlightNeeded()
Declaration
isHighlightNeeded(): boolean;
Returns
isStubOrEmpty()
Declaration
isStubOrEmpty(): boolean;
Returns
onResized()
Declaration
Returns
quickUpdate()
Declaration
Returns
removeIsEditingChanged(listener)
Declaration
removeIsEditingChanged(listener: (ph: PlaceholderItemHandler) => void): void;
Parameters
Returns
Declaration
removeSelectButtonClick(handler: (handler: PlaceholderItemHandler) => void): void;
Parameters
Returns
resetContent()
Declaration
Returns
rotateContentLeft()
Declaration
rotateContentLeft(): void;
Returns
rotateContentRight()
Declaration
rotateContentRight(): void;
Returns
setBadToGoodChangeScaleBarClass()
Declaration
setBadToGoodChangeScaleBarClass(): void;
Returns
setBadToWarningChangeScaleBarClass()
Declaration
setBadToWarningChangeScaleBarClass(): void;
Returns
setBottomFrame(index, v)
Declaration
setBottomFrame(index: any, v: any): void;
Parameters
| Type |
Name |
Description |
| any |
index |
|
| any |
v |
|
Returns
setContentScale(value)
Declaration
setContentScale(value: number): void;
Parameters
| Type |
Name |
Description |
| number |
value |
|
Returns
setContentUpdating(v)
Declaration
setContentUpdating(v: boolean): void;
Parameters
| Type |
Name |
Description |
| boolean |
v |
|
Returns
setQualityChangeInfoBarText(value)
Declaration
setQualityChangeInfoBarText(value: string): void;
Parameters
| Type |
Name |
Description |
| string |
value |
|
Returns
setQualityChangeScaleBarWidth(progress)
Declaration
setQualityChangeScaleBarWidth(progress: number): void;
Parameters
| Type |
Name |
Description |
| number |
progress |
|
Returns
setRectangle(rectangle, suppressOnChanged, forcePlaceholderSet)
Declaration
setRectangle(rectangle?: RotatedRectangleF, suppressOnChanged?: boolean, forcePlaceholderSet?: boolean): void;
Parameters
| Type |
Name |
Description |
| RotatedRectangleF |
rectangle |
|
| boolean |
suppressOnChanged |
|
| boolean |
forcePlaceholderSet |
|
Returns
setTopFrame(index, v)
Declaration
setTopFrame(index: number, v: any): void;
Parameters
| Type |
Name |
Description |
| number |
index |
|
| any |
v |
|
Returns
setWarningToGoodChangeScaleBarClass()
Declaration
setWarningToGoodChangeScaleBarClass(): void;
Returns
Declaration
showEditButton(): boolean;
Returns
Declaration
showHandleButton(): boolean;
Returns
Declaration
showHandleToolbarButton(): boolean;
Returns
Declaration
showSelectButton(): boolean;
Returns
Declaration
showSelectToolbarButton(): boolean;
Returns
Declaration
Returns
Declaration
transformChanged(): void;
Returns
updateContentAndFrames(func)
Declaration
updateContentAndFrames(func: (itemHandler: ContentItemHandler) => void): void;
Parameters
Returns