Class ImageItemHandler
Inheritance
ImageItemHandler
Constructors
(constructor)(item, textWhizz, apiClient, colorPreviewService, options)
Constructs a new instance of the ImageItemHandler class
Declaration
constructor(item?: ImageItem, textWhizz?: typeof TextWhizz, apiClient?: IDesignAtomsApiClient, colorPreviewService?: IListenableColorPreviewService, options?: IPlaceholderHandlerOptions);
Parameters
Properties
_actualSize
Declaration
protected _actualSize: boolean;
Property Value
_imageResizedEvent
Declaration
protected _imageResizedEvent: EventWithSenderArg<this, IImageResizedData>;
Property Value
_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 |
|
_saveAspectRatio
Declaration
protected _saveAspectRatio: boolean;
Property Value
_sourceUrl
Declaration
protected _sourceUrl: string;
Property Value
_takeIntoAccountImageDpi
Declaration
protected _takeIntoAccountImageDpi: boolean;
Property Value
isQualityChangeBarEmpty
Declaration
get isQualityChangeBarEmpty(): boolean;
Property Value
item
Declaration
get item(): ImageItem;
set item(item: ImageItem);
Property Value
| Type |
Description |
| ImageItem |
|
needToDownloadImage
Declaration
get needToDownloadImage(): boolean;
set needToDownloadImage(v: boolean);
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 |
|
sourceImageHorizontalResolution
Declaration
get sourceImageHorizontalResolution(): number;
set sourceImageHorizontalResolution(value: number);
Property Value
sourceImageVerticalResolution
Declaration
get sourceImageVerticalResolution(): number;
set sourceImageVerticalResolution(value: number);
Property Value
takeIntoAccountImageDpi
Declaration
get takeIntoAccountImageDpi(): boolean;
set takeIntoAccountImageDpi(v: boolean);
Property Value
typeName
Declaration
static readonly typeName: string;
Property Value
Methods
_createDataInstance(itemHandler)
Declaration
protected _createDataInstance(itemHandler?: ImageItemHandler): ImageHandlerData;
Parameters
Returns
_createImageUrl()
Declaration
protected _createImageUrl(): string;
Returns
_getDefaultPermissions()
Declaration
protected _getDefaultPermissions(): IPermissions;
Returns
_getDrawingFillColor()
Declaration
protected _getDrawingFillColor(): Color;
Returns
_onItemPropertyChanged(sender, propertyName)
Declaration
protected _onItemPropertyChanged(sender: ImageItem, propertyName: string): void;
Parameters
| Type |
Name |
Description |
| ImageItem |
sender |
|
| string |
propertyName |
|
Returns
_setDataItem(item, itemHandlerData)
Declaration
protected _setDataItem(item: ImageItem, itemHandlerData: any): void;
Parameters
| Type |
Name |
Description |
| ImageItem |
item |
|
| any |
itemHandlerData |
|
Returns
_updateImageUrl()
Declaration
protected _updateImageUrl(): void;
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> |
|
addImageResized(handler)
Declaration
addImageResized(handler: (sender?: ImageItemHandler, data?: IImageResizedData) => any): void;
Parameters
Returns
loadImage(sourceUrl, options)
Loads an image from the external source using the specified parameters.
Declaration
loadImage(sourceUrl: string, options?: ImageLoadOptions): Promise<string>;
Parameters
| Type |
Name |
Description |
| string |
sourceUrl |
The URL to load image from.
|
| ImageLoadOptions |
options |
|
Returns
| Type |
Description |
| Promise<string> |
storage id of loaded image
|
loadImageFromRemoteUrl(remoteUrl, appDomainUrl)
Declaration
loadImageFromRemoteUrl(remoteUrl: string, appDomainUrl?: string): Promise<void>;
Parameters
| Type |
Name |
Description |
| string |
remoteUrl |
|
| string |
appDomainUrl |
|
Returns
| Type |
Description |
| Promise<void> |
|
onResized()
Declaration
Returns
removeImageResized(handler)
Declaration
removeImageResized(handler: (sender?: ImageItemHandler, data?: IImageResizedData) => any): void;
Parameters
Returns
setBadToGoodChangeScaleBarClass()
Declaration
setBadToGoodChangeScaleBarClass(): void;
Returns
setBadToWarningChangeScaleBarClass()
Declaration
setBadToWarningChangeScaleBarClass(): void;
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
setWarningToGoodChangeScaleBarClass()
Declaration
setWarningToGoodChangeScaleBarClass(): void;
Returns
Declaration
showEditButton(): boolean;
Returns
updateRectangle(keepLocation, resizeMode, parentPlaceholder, hiResOutputDpi)
Declaration
updateRectangle(keepLocation?: boolean, resizeMode?: ResizeMode, parentPlaceholder?: PlaceholderItemHandler, hiResOutputDpi?: number): void;
Parameters
Returns