Back to Website
Show / Hide Table of Contents

Class Viewer

Inheritance
BaseViewer
Viewer
Package: @aurigma/design-atoms

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

actualSizeVerticalScale

Declaration
get actualSizeVerticalScale(): number;
Property Value
Type Description
number

backendUrl

Declaration
get backendUrl(): string;

set backendUrl(value: string);
Property Value
Type Description
string

canvas

Declaration
get canvas(): Canvas;
Property Value
Type Description
Canvas

clearSelectionOnDocumentClick

Declaration
get clearSelectionOnDocumentClick(): boolean;

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

clearSelectionOnViewerClick

Declaration
get clearSelectionOnViewerClick(): boolean;

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

colorParser

Declaration
get colorParser(): IColorParser;
Property Value
Type Description
IColorParser

colorPreviewService

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

commandManager

Declaration
get commandManager(): CommandManager;
Property Value
Type Description
CommandManager

configuration

Declaration
get configuration(): IViewerConfiguration;

set configuration(conf: IViewerConfiguration);
Property Value
Type Description
IViewerConfiguration

containersFlatList

Declaration
get containersFlatList(): Container[];
Property Value
Type Description
Container[]

containersFlatListChangedEvent

Declaration
readonly containersFlatListChangedEvent: EventObject<ContainersChangeData>;
Property Value
Type Description
EventObject<ContainersChangeData>

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
get currentItem(): Item;
Property Value
Type Description
Item

designAtomsApiClient

Declaration
get designAtomsApiClient(): IDesignAtomsApiClient;
Property Value
Type Description
IDesignAtomsApiClient

eventManager

Declaration
get eventManager(): IEventManager;
Property Value
Type Description
IEventManager

frontEndTextRenderingEnabled

Declaration
readonly frontEndTextRenderingEnabled: boolean;
Property Value
Type Description
boolean

gridHandler

Declaration
get gridHandler(): GridHandler;
Property Value
Type Description
GridHandler

history

Declaration
get history(): History;
Property Value
Type Description
History_2

hitTestManager

Declaration
get hitTestManager(): IHitTestManager;
Property Value
Type Description
IHitTestManager

inputHandlerManager

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.

Remarks

Interactive containers allows to define product containers which items can be selected by user. If this property is null or empty then items from any containers can be selected by user.

interactiveZonesHandler

Declaration
get interactiveZonesHandler(): IInteractiveZonesHandler;
Property Value
Type Description
IInteractiveZonesHandler

itemsDataApplier

Declaration
get itemsDataApplier(): ItemsDataApplier;
Property Value
Type Description
ItemsDataApplier

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

preventKeyHandleClass

Declaration
static preventKeyHandleClass: string;
Property Value
Type Description
string

previewMode

Declaration
get previewMode(): boolean;

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

productHandler

Declaration
get productHandler(): ProductHandler;
Property Value
Type Description
ProductHandler

productThemeManager

Declaration
get productThemeManager(): ProductThemeManager;
Property Value
Type Description
ProductThemeManager

renderingConfig

Declaration
get renderingConfig(): IRenderingConfig | null;
Property Value
Type Description
IRenderingConfig | null

renderingConfigProvider

Declaration
get renderingConfigProvider(): IRenderingConfigProvider;
Property Value
Type Description
IRenderingConfigProvider

rgbColorParser

Declaration
get rgbColorParser(): IRgbColorParser;
Property Value
Type Description
IRgbColorParser

safetyLinesHandler

Declaration
get safetyLinesHandler(): SafetyLinesHandler;
Property Value
Type Description
SafetyLinesHandler

selectedItems

Declaration
get selectedItems(): Item[];

set selectedItems(value: Item[]);
Property Value
Type Description
Item[]

surface

Declaration
get surface(): Surface;

set surface(value: Surface);
Property Value
Type Description
Surface

surfaceHandler

Declaration
get surfaceHandler(): SurfaceHandler;
Property Value
Type Description
SurfaceHandler

textEditorMode

Declaration
get textEditorMode(): TextEditorMode;

set textEditorMode(value: TextEditorMode);
Property Value
Type Description
TextEditorMode

textFormattingEnabled

Declaration
get textFormattingEnabled(): boolean;

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

userEditContainer

Declaration
get userEditContainer(): SurfaceContainer;

set userEditContainer(value: SurfaceContainer);
Property Value
Type Description
SurfaceContainer

variableItemHelper

Declaration
get variableItemHelper(): VariableItemHelper;
Property Value
Type Description
VariableItemHelper

viewportDiv

Declaration
get viewportDiv(): HTMLDivElement;
Property Value
Type Description
HTMLDivElement

violationService

Declaration
get violationService(): ViolationService;
Property Value
Type Description
ViolationService

violationServiceFactory

Declaration
get violationServiceFactory(): ViolationServiceFactory;
Property Value
Type Description
ViolationServiceFactory

watermarkConfig

Declaration
get watermarkConfig(): WatermarkConfig;

set watermarkConfig(value: WatermarkConfig);
Property Value
Type Description
WatermarkConfig

whitespaceDiv

Declaration
get whitespaceDiv(): HTMLDivElement;
Property Value
Type Description
HTMLDivElement

workspaceHeight

Declaration
get workspaceHeight(): number;
Property Value
Type Description
number

workspaceWidth

Declaration
get workspaceWidth(): number;
Property Value
Type Description
number

zoomConfig

Declaration
get zoomConfig(): import("./Interfaces").IRangeParams;
Property Value
Type Description
import("./Interfaces").IRangeParams

Methods

_getElementForCursor()

Declaration
protected _getElementForCursor(): HTMLElement;
Returns
Type Description
HTMLElement

_ignoreSelectionClick(e)

Declaration
_ignoreSelectionClick(e: MouseEvent): boolean;
Parameters
Type Name Description
MouseEvent e
Returns
Type Description
boolean

_onResize(sender, updateButtonGroup)

Declaration
_onResize(sender: any, updateButtonGroup: any): void;
Parameters
Type Name Description
any sender
any updateButtonGroup
Returns
Type Description
void

_refresh()

Refresh the control immediately

Declaration
_refresh(): void;
Returns
Type Description
void

_renderContent(sb)

Declaration
protected _renderContent(sb: string): string;
Parameters
Type Name Description
string sb
Returns
Type Description
string

_setZoomMode(v)

Declaration
protected _setZoomMode(v: ZoomMode): void;
Parameters
Type Name Description
ZoomMode v
Returns
Type Description
void

_updateViewport(ignoreZoomConfigRestrictions)

Declaration
protected _updateViewport(ignoreZoomConfigRestrictions?: boolean): void;
Parameters
Type Name Description
boolean ignoreZoomConfigRestrictions
Returns
Type Description
void

_updateViewportNew()

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

_updateWhitespace()

Declaration
_updateWhitespace(): void;
Returns
Type Description
void

dispose()

Removes the current Viewer from the application.

Declaration
dispose(): void;
Returns
Type Description
void

ensureFocus()

Declaration
ensureFocus(): void;
Returns
Type Description
void

exitEditMode()

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

getCurrentSurfacePreview(options)

Declaration
getCurrentSurfacePreview(options?: IPreviewOptions): Promise<Blob>;
Parameters
Type Name Description
IPreviewOptions options

Preview rendering options

Returns
Type Description
Promise<Blob>

Blob containing the preview image of the current surface

getHandler(item)

Declaration
getHandler(item: BaseItem): ItemHandler;
Parameters
Type Name Description
BaseItem item
Returns
Type Description
ItemHandler

getHandler(item)

Declaration
getHandler(item: ArchedTextItem): ArchedTextItemHandler;
Parameters
Type Name Description
ArchedTextItem item
Returns
Type Description
ArchedTextItemHandler

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
Type Name Description
PlainTextItem item
Returns
Type Description
PlainTextItemHandler

getHandler(item)

Declaration
getHandler(item: ShapeItem): ShapeItemHandler;
Parameters
Type Name Description
ShapeItem item
Returns
Type Description
ShapeItemHandler

getHandler(item)

Declaration
getHandler(item: RectangleItem): RectangleItemHandler;
Parameters
Type Name Description
RectangleItem item
Returns
Type Description
RectangleItemHandler

getHandler(item)

Declaration
getHandler(item: PlaceholderItem): PlaceholderItemHandler;
Parameters
Type Name Description
PlaceholderItem item
Returns
Type Description
PlaceholderItemHandler

getHandler(item)

Declaration
getHandler(item: BoundedTextItem): BoundedTextItemHandler;
Parameters
Type Name Description
BoundedTextItem item
Returns
Type Description
BoundedTextItemHandler

getHandler(item)

Declaration
getHandler(item: ImageItem): ImageItemHandler;
Parameters
Type Name Description
ImageItem item
Returns
Type Description
ImageItemHandler

getHandler(item)

Declaration
getHandler(item: PlaceholderItem): PlaceholderItemHandler;
Parameters
Type Name Description
PlaceholderItem item
Returns
Type Description
PlaceholderItemHandler

getHandler(item)

Declaration
getHandler(item: AutoScaledTextItem): AutoScaledTextItemHandler;
Parameters
Type Name Description
AutoScaledTextItem item
Returns
Type Description
AutoScaledTextItemHandler

getMaxZoom()

Declaration
getMaxZoom(): number;
Returns
Type Description
number

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

getUserEditSurface()

Declaration
getUserEditSurface(): Surface;
Returns
Type Description
Surface

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

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

lockViewer()

Declaration
lockViewer(): void;
Returns
Type Description
void

queryItems(selectors, queryOptions)

Declaration
queryItems(selectors: string, queryOptions?: IQueryOptions): Item[];
Parameters
Type Name Description
string selectors
IQueryOptions queryOptions
Returns
Type Description
Item[]

releaseHandler(itemHandler)

Declaration
releaseHandler(itemHandler: ItemHandler): void;
Parameters
Type Name Description
ItemHandler itemHandler
Returns
Type Description
void

setInputHandlerType(type, args, options)

Declaration
setInputHandlerType(type: InputHandlerType.Create, args: ICreateInputHandlerArgs, options?: ISetInputHandlerOptions): any;
Parameters
Type Name Description
InputHandlerType.Create type
ICreateInputHandlerArgs args
ISetInputHandlerOptions options
Returns
Type Description
any

setInputHandlerType(type)

Declaration
setInputHandlerType(type: InputHandlerType.Default): any;
Parameters
Type Name Description
InputHandlerType.Default type
Returns
Type Description
any

setInputHandlerType(type)

Declaration
setInputHandlerType(type: InputHandlerType.Locked): any;
Parameters
Type Name Description
InputHandlerType.Locked type
Returns
Type Description
any

setInputHandlerType(type, args, options)

Declaration
setInputHandlerType(type: InputHandlerType.SelectPixel, args: IInputHandlerArgs, options?: ISetInputHandlerOptions): any;
Parameters
Type Name Description
InputHandlerType.SelectPixel type
IInputHandlerArgs args
ISetInputHandlerOptions options
Returns
Type Description
any

setTextEditorMode(value)

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

setTextWhizzModule(textWhizz)

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

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

unlockViewer()

Hides the semi-transparent rectangle when it is shown over the Viewer

Declaration
unlockViewer(): void;
Returns
Type Description
void
Remarks

To show this rectangle use the Viewer.lockViewer method.

waitUpdate()

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

zoomToRectangle(rect)

Declaration
zoomToRectangle(rect: RectangleF): void;
Parameters
Type Name Description
RectangleF rect
Returns
Type Description
void

zoomToSelection()

Declaration
zoomToSelection(): void;
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