Class Viewer
Constructors
(constructor)({ holderElement, backendUrl, surface, canvasBackground, rulerEnabled, frontEndTextRenderingEnabled, zone, productViewerPartId, ignorePermissionsMode, keyInputElement, readonlyCanvasMode })
Constructs a new instance of the Viewer class
Declaration
constructor({ holderElement, backendUrl, surface, canvasBackground, rulerEnabled, frontEndTextRenderingEnabled, zone, productViewerPartId, ignorePermissionsMode, keyInputElement, readonlyCanvasMode }: IOptions);
Parameters
| Type |
Name |
Description |
| IOptions |
{ holderElement, backendUrl, surface, canvasBackground, rulerEnabled, frontEndTextRenderingEnabled, zone, productViewerPartId, ignorePermissionsMode, keyInputElement, readonlyCanvasMode } |
|
Properties
_onDocumentClick
Declaration
_onDocumentClick: (e: MouseEvent) => void;
Property Value
| Type |
Description |
| (e: MouseEvent) => void |
|
actualSizeHorizontalScale
Declaration
get actualSizeHorizontalScale(): number;
Property Value
actualSizeVerticalScale
Declaration
get actualSizeVerticalScale(): number;
Property Value
backendUrl
Declaration
get backendUrl(): string;
set backendUrl(value: string);
Property Value
canvas
Declaration
Property Value
clearSelectionOnDocumentClick
Declaration
get clearSelectionOnDocumentClick(): boolean;
set clearSelectionOnDocumentClick(value: boolean);
Property Value
clearSelectionOnViewerClick
Declaration
get clearSelectionOnViewerClick(): boolean;
set clearSelectionOnViewerClick(value: boolean);
Property Value
colorParser
Declaration
get colorParser(): IColorParser;
Property Value
colorPreviewService
Declaration
get colorPreviewService(): IListenableColorPreviewService;
Property Value
commandManager
Declaration
get commandManager(): CommandManager;
Property Value
configuration
Declaration
get configuration(): IViewerConfiguration;
set configuration(conf: IViewerConfiguration);
Property Value
containersFlatList
Declaration
get containersFlatList(): Container[];
Property Value
containersFlatListChangedEvent
Declaration
readonly containersFlatListChangedEvent: EventObject<ContainersChangeData>;
Property Value
contentHeight
Content height in css pixels
Declaration
get contentHeight(): number;
Property Value
| Type |
Description |
| number |
Content height in css pixels
|
contentWidth
Content width in css pixels
Declaration
get contentWidth(): number;
Property Value
| Type |
Description |
| number |
Content width in css pixels
|
currentItem
Declaration
Property Value
designAtomsApiClient
Declaration
get designAtomsApiClient(): IDesignAtomsApiClient;
Property Value
eventManager
Declaration
get eventManager(): IEventManager;
Property Value
frontEndTextRenderingEnabled
Declaration
readonly frontEndTextRenderingEnabled: boolean;
Property Value
gridHandler
Declaration
get gridHandler(): GridHandler;
Property Value
history
Declaration
Property Value
hitTestManager
Declaration
get hitTestManager(): IHitTestManager;
Property Value
Declaration
get inputHandlerManager(): InputHandlerManager;
Property Value
| Type |
Description |
| InputHandlerManager |
|
interactiveContainers
Gets or sets interactive containers of the Product.
Declaration
get interactiveContainers(): Container[];
set interactiveContainers(value: Container[]);
Property Value
| Type |
Description |
| Container[] |
Gets or sets interactive containers of the Product.
|
interactiveZonesHandler
Declaration
get interactiveZonesHandler(): IInteractiveZonesHandler;
Property Value
itemsDataApplier
Declaration
get itemsDataApplier(): ItemsDataApplier;
Property Value
licenseHandler
Declaration
get licenseHandler(): LicenseHandler;
Property Value
| Type |
Description |
| LicenseHandler |
|
modalBgClass
Gets modal background class name.
Declaration
get modalBgClass(): string;
set modalBgClass(value: string);
Property Value
| Type |
Description |
| string |
Gets modal background class name.
|
preventClickHandleClass
Declaration
static preventClickHandleClass: string;
Property Value
preventKeyHandleClass
Declaration
static preventKeyHandleClass: string;
Property Value
previewMode
Declaration
get previewMode(): boolean;
set previewMode(value: boolean);
Property Value
productHandler
Declaration
get productHandler(): ProductHandler;
Property Value
productThemeManager
Declaration
get productThemeManager(): ProductThemeManager;
Property Value
renderingConfig
Declaration
get renderingConfig(): IRenderingConfig | null;
Property Value
renderingConfigProvider
Declaration
get renderingConfigProvider(): IRenderingConfigProvider;
Property Value
rgbColorParser
Declaration
get rgbColorParser(): IRgbColorParser;
Property Value
safetyLinesHandler
Declaration
get safetyLinesHandler(): SafetyLinesHandler;
Property Value
selectedItems
Declaration
get selectedItems(): Item[];
set selectedItems(value: Item[]);
Property Value
surface
Declaration
get surface(): Surface;
set surface(value: Surface);
Property Value
surfaceHandler
Declaration
get surfaceHandler(): SurfaceHandler;
Property Value
textEditorMode
Declaration
get textEditorMode(): TextEditorMode;
set textEditorMode(value: TextEditorMode);
Property Value
textFormattingEnabled
Declaration
get textFormattingEnabled(): boolean;
set textFormattingEnabled(v: boolean);
Property Value
userEditContainer
Declaration
get userEditContainer(): SurfaceContainer;
set userEditContainer(value: SurfaceContainer);
Property Value
variableItemHelper
Declaration
get variableItemHelper(): VariableItemHelper;
Property Value
viewportDiv
Declaration
get viewportDiv(): HTMLDivElement;
Property Value
| Type |
Description |
| HTMLDivElement |
|
violationService
Declaration
get violationService(): ViolationService;
Property Value
violationServiceFactory
Declaration
get violationServiceFactory(): ViolationServiceFactory;
Property Value
watermarkConfig
Declaration
get watermarkConfig(): WatermarkConfig;
set watermarkConfig(value: WatermarkConfig);
Property Value
whitespaceDiv
Declaration
get whitespaceDiv(): HTMLDivElement;
Property Value
| Type |
Description |
| HTMLDivElement |
|
workspaceHeight
Declaration
get workspaceHeight(): number;
Property Value
workspaceWidth
Declaration
get workspaceWidth(): number;
Property Value
zoomConfig
Declaration
get zoomConfig(): import("./Interfaces").IRangeParams;
Property Value
Methods
_getElementForCursor()
Declaration
protected _getElementForCursor(): HTMLElement;
Returns
| Type |
Description |
| HTMLElement |
|
_ignoreSelectionClick(e)
Declaration
_ignoreSelectionClick(e: MouseEvent): boolean;
Parameters
| Type |
Name |
Description |
| MouseEvent |
e |
|
Returns
_onResize(sender, updateButtonGroup)
Declaration
_onResize(sender: any, updateButtonGroup: any): void;
Parameters
| Type |
Name |
Description |
| any |
sender |
|
| any |
updateButtonGroup |
|
Returns
_refresh()
Refresh the control immediately
Declaration
Returns
_renderContent(sb)
Declaration
protected _renderContent(sb: string): string;
Parameters
| Type |
Name |
Description |
| string |
sb |
|
Returns
_setZoomMode(v)
Declaration
protected _setZoomMode(v: ZoomMode): void;
Parameters
Returns
_updateViewport(ignoreZoomConfigRestrictions)
Declaration
protected _updateViewport(ignoreZoomConfigRestrictions?: boolean): void;
Parameters
| Type |
Name |
Description |
| boolean |
ignoreZoomConfigRestrictions |
|
Returns
_updateViewportNew()
Declaration
protected _updateViewportNew(): void;
Returns
_updateWhitespace()
Declaration
_updateWhitespace(): void;
Returns
dispose()
Removes the current Viewer from the application.
Declaration
Returns
ensureFocus()
Declaration
Returns
exitEditMode()
Declaration
exitEditMode(): Promise<void>;
Returns
| Type |
Description |
| Promise<void> |
|
getCurrentSurfacePreview(options)
Declaration
getCurrentSurfacePreview(options?: IPreviewOptions): Promise<Blob>;
Parameters
Returns
| Type |
Description |
| Promise<Blob> |
Blob containing the preview image of the current surface
|
getHandler(item)
Declaration
getHandler(item: BaseItem): ItemHandler;
Parameters
Returns
getHandler(item)
Declaration
getHandler(item: ArchedTextItem): ArchedTextItemHandler;
Parameters
Returns
getHandler(item)
Declaration
getHandler<THandler extends ItemHandler>(item: Item): THandler;
Parameters
| Type |
Name |
Description |
| Item |
item |
|
Returns
| Type |
Description |
| THandler |
|
Type Parameters
| Name |
Description |
| THandler |
|
getHandler(item)
Declaration
getHandler(item: PlainTextItem): PlainTextItemHandler;
Parameters
Returns
getHandler(item)
Declaration
getHandler(item: ShapeItem): ShapeItemHandler;
Parameters
Returns
getHandler(item)
Declaration
getHandler(item: RectangleItem): RectangleItemHandler;
Parameters
Returns
getHandler(item)
Declaration
getHandler(item: PlaceholderItem): PlaceholderItemHandler;
Parameters
Returns
getHandler(item)
Declaration
getHandler(item: BoundedTextItem): BoundedTextItemHandler;
Parameters
Returns
getHandler(item)
Declaration
getHandler(item: ImageItem): ImageItemHandler;
Parameters
| Type |
Name |
Description |
| ImageItem |
item |
|
Returns
getHandler(item)
Declaration
getHandler(item: PlaceholderItem): PlaceholderItemHandler;
Parameters
Returns
getHandler(item)
Declaration
getHandler(item: AutoScaledTextItem): AutoScaledTextItemHandler;
Parameters
Returns
getMaxZoom()
Declaration
Returns
getSurfacePreview(surfaceIndex, options)
Declaration
getSurfacePreview(surfaceIndex: number, options?: IPreviewOptions): Promise<Blob>;
Parameters
| Type |
Name |
Description |
| number |
surfaceIndex |
Index of the surface to preview
|
| IPreviewOptions |
options |
Preview rendering options
|
Returns
| Type |
Description |
| Promise<Blob> |
Blob containing the preview image of given surface
|
getUserEditPrintArea()
Declaration
getUserEditPrintArea(): PrintArea;
Returns
getUserEditSurface()
Declaration
getUserEditSurface(): Surface;
Returns
initialize({ ignore, intervalCheckLoop, readonlyCanvasMode })
Declaration
initialize({ ignore, intervalCheckLoop, readonlyCanvasMode }?: {
ignore?: boolean;
intervalCheckLoop?: any;
readonlyCanvasMode?: boolean;
}): void;
Parameters
| Type |
Name |
Description |
| {
ignore?: boolean;
intervalCheckLoop?: any;
readonlyCanvasMode?: boolean;
} |
{ ignore, intervalCheckLoop, readonlyCanvasMode } |
|
Returns
initTextEditor(fontService, useSimpleFontList, textEditor, textInputIssueUserConfirmationDelegate)
Declaration
initTextEditor(fontService: IFontService, useSimpleFontList: boolean, textEditor?: TextEditorMode, textInputIssueUserConfirmationDelegate?: Func<Promise<boolean>, string>): void;
Parameters
| Type |
Name |
Description |
| IFontService |
fontService |
|
| boolean |
useSimpleFontList |
|
| TextEditorMode |
textEditor |
|
| Func<Promise<boolean>, string> |
textInputIssueUserConfirmationDelegate |
|
Returns
lockViewer()
Declaration
Returns
queryItems(selectors, queryOptions)
Declaration
queryItems(selectors: string, queryOptions?: IQueryOptions): Item[];
Parameters
| Type |
Name |
Description |
| string |
selectors |
|
| IQueryOptions |
queryOptions |
|
Returns
releaseHandler(itemHandler)
Declaration
releaseHandler(itemHandler: ItemHandler): void;
Parameters
Returns
Declaration
setInputHandlerType(type: InputHandlerType.Create, args: ICreateInputHandlerArgs, options?: ISetInputHandlerOptions): any;
Parameters
| Type |
Name |
Description |
| InputHandlerType.Create |
type |
|
| ICreateInputHandlerArgs |
args |
|
| ISetInputHandlerOptions |
options |
|
Returns
Declaration
setInputHandlerType(type: InputHandlerType.Default): any;
Parameters
| Type |
Name |
Description |
| InputHandlerType.Default |
type |
|
Returns
Declaration
setInputHandlerType(type: InputHandlerType.Locked): any;
Parameters
| Type |
Name |
Description |
| InputHandlerType.Locked |
type |
|
Returns
Declaration
setInputHandlerType(type: InputHandlerType.SelectPixel, args: IInputHandlerArgs, options?: ISetInputHandlerOptions): any;
Parameters
| Type |
Name |
Description |
| InputHandlerType.SelectPixel |
type |
|
| IInputHandlerArgs |
args |
|
| ISetInputHandlerOptions |
options |
|
Returns
setTextEditorMode(value)
Declaration
setTextEditorMode(value: number): void;
Parameters
| Type |
Name |
Description |
| number |
value |
|
Returns
setTextWhizzModule(textWhizz)
Declaration
setTextWhizzModule(textWhizz: typeof TextWhizz): void;
Parameters
| Type |
Name |
Description |
| typeof TextWhizz |
textWhizz |
|
Returns
setZoom(value, params, ignoreZoomConfigRestrictions, withoutUpdate)
Declaration
setZoom(value: number, params?: ZoomParams, ignoreZoomConfigRestrictions?: boolean, withoutUpdate?: boolean): number;
Parameters
| Type |
Name |
Description |
| number |
value |
|
| ZoomParams |
params |
|
| boolean |
ignoreZoomConfigRestrictions |
|
| boolean |
withoutUpdate |
|
Returns
unlockViewer()
Hides the semi-transparent rectangle when it is shown over the Viewer
Declaration
Returns
waitUpdate()
Declaration
waitUpdate(): Promise<void>;
Returns
| Type |
Description |
| Promise<void> |
|
zoomToRectangle(rect)
Declaration
zoomToRectangle(rect: RectangleF): void;
Parameters
Returns
zoomToSelection()
Declaration
Returns