Back to Website
Show / Hide Table of Contents

Class BaseViewer

Package: @aurigma/design-atoms

Constructors

(constructor)(_zone)

Constructs a new instance of the BaseViewer class

Declaration
constructor(_zone?: any);
Parameters
Type Name Description
any _zone

Properties

_baseRulersOffset

Declaration
protected _baseRulersOffset: PointF;
Property Value
Type Description
PointF

_canvas

Declaration
protected _canvas: Canvas;
Property Value
Type Description
Canvas

_contentAngle

Declaration
protected _contentAngle: number;
Property Value
Type Description
number

_contentCtx

Declaration
protected _contentCtx: HTMLElement;
Property Value
Type Description
HTMLElement

_contentElements

Declaration
protected _contentElements: any[];
Property Value
Type Description
any[]

_documentClickEvent

Declaration
protected _documentClickEvent: EventWithSenderArg<BaseViewer, Object>;
Property Value
Type Description
EventWithSenderArg<BaseViewer, Object>

_holderElement

Declaration
protected _holderElement: HTMLElement;
Property Value
Type Description
HTMLElement

_ignoreDocumentClickOnce

Declaration
protected _ignoreDocumentClickOnce: boolean;
Property Value
Type Description
boolean

_intervalCheckLoop

Declaration
protected _intervalCheckLoop: {
        start({ checkFunction, onChange, delayMs }: {
            checkFunction: () => boolean;
            onChange: Function;
            delayMs?: number;
        }): any;
        stop(checkId: any): void;
    };
Property Value
Type Description
{ start({ checkFunction, onChange, delayMs }: { checkFunction: () => boolean; onChange: Function; delayMs?: number; }): any; stop(checkId: any): void; }

_needToRefresh

Declaration
protected _needToRefresh: boolean;
Property Value
Type Description
boolean

_onDocumentClick

Declaration
_onDocumentClick: (e: MouseEvent) => void;
Property Value
Type Description
(e: MouseEvent) => void

_onScroll

Declaration
protected _onScroll: (e: any) => void;
Property Value
Type Description
(e: any) => void

_pointerEvents

Declaration
protected get _pointerEvents(): {
        start: string;
        move: string;
        up: string;
        cancel: string;
    };
Property Value
Type Description
{ start: string; move: string; up: string; cancel: string; }

_refreshTimer

Declaration
protected _refreshTimer: any;
Property Value
Type Description
any

_rulerBorderWidth

Declaration
protected _rulerBorderWidth: number;
Property Value
Type Description
number

_rulersOnHover

Declaration
protected _rulersOnHover: (e: IPointerParams) => void;
Property Value
Type Description
(e: IPointerParams) => void

_screenXDpi

Declaration
protected _screenXDpi: number;
Property Value
Type Description
number

_screenYDpi

Declaration
protected _screenYDpi: number;
Property Value
Type Description
number

_viewerElement

Declaration
protected _viewerElement: HTMLDivElement;
Property Value
Type Description
HTMLDivElement

_workspaceDoubleClickEvent

Declaration
protected _workspaceDoubleClickEvent: EventWithSenderArg<BaseViewer, Object>;
Property Value
Type Description
EventWithSenderArg<BaseViewer, Object>

_workspaceMouseDownEvent

Declaration
protected _workspaceMouseDownEvent: EventWithSenderArg<BaseViewer, Object>;
Property Value
Type Description
EventWithSenderArg<BaseViewer, Object>

_workspaceMouseMoveEvent

Declaration
protected _workspaceMouseMoveEvent: EventWithSenderArg<BaseViewer, Object>;
Property Value
Type Description
EventWithSenderArg<BaseViewer, Object>

_workspaceMouseUpEvent

Declaration
protected _workspaceMouseUpEvent: EventWithSenderArg<BaseViewer, Object>;
Property Value
Type Description
EventWithSenderArg<BaseViewer, Object>

_zone

Declaration
protected _zone: any;
Property Value
Type Description
any

actualRulerWidth

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

actualSizeHorizontalScale

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

bestFitWhiteSpacePc

Declaration
get bestFitWhiteSpacePc(): number;

set bestFitWhiteSpacePc(v: number);
Property Value
Type Description
number

clientSideOptions

Declaration
get clientSideOptions(): ViewerClientSideOptions;
Property Value
Type Description
ViewerClientSideOptions

contentAngle

Declaration
get contentAngle(): number;

set contentAngle(value: number);
Property Value
Type Description
number

contentCtx

Declaration
get contentCtx(): HTMLElement;
Property Value
Type Description
HTMLElement

contentHeight

Declaration
get contentHeight(): any;
Property Value
Type Description
any

contentWidth

Declaration
get contentWidth(): any;
Property Value
Type Description
any

delayedRefreshTimeout

Declaration
get delayedRefreshTimeout(): number;

set delayedRefreshTimeout(v: number);
Property Value
Type Description
number

element

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

exceptionDescription

Declaration
get exceptionDescription(): string;
Property Value
Type Description
string

height

Declaration
get height(): any;
Property Value
Type Description
any

holderBounds

Declaration
get holderBounds(): {
        width: any;
        height: any;
        offsetWidth: any;
        offsetHeight: any;
        offsetTop: any;
        offsetLeft: any;
    };
Property Value
Type Description
{ width: any; height: any; offsetWidth: any; offsetHeight: any; offsetTop: any; offsetLeft: any; }

id

Declaration
get id(): string;
Property Value
Type Description
string

minZoom

Gets the minimum allowed zoom value

Declaration
get minZoom(): number;

set minZoom(value: number);
Property Value
Type Description
number

Gets the minimum allowed zoom value

Remarks

Zoom values are measured in percents/100. It means that value = 1 specify 100% zoom (i.e. actual size), value = 10 means 1000% zoom (10x), value = 0,5 means 50% zoom (half), etc.

pinchZoomEnabled

Declaration
get pinchZoomEnabled(): boolean;

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

returnValue

Declaration
get returnValue(): string;
Property Value
Type Description
string

rulerDivision

Declaration
get rulerDivision(): number;

set rulerDivision(v: number);
Property Value
Type Description
number

rulerEnabled

Declaration
get rulerEnabled(): boolean;

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

rulerOffsetX

Declaration
get rulerOffsetX(): number;

set rulerOffsetX(v: number);
Property Value
Type Description
number

rulerOffsetY

Declaration
get rulerOffsetY(): number;

set rulerOffsetY(v: number);
Property Value
Type Description
number

rulerScale

Declaration
get rulerScale(): number;

set rulerScale(v: number);
Property Value
Type Description
number

rulerWidth

Declaration
get rulerWidth(): number;

set rulerWidth(v: number);
Property Value
Type Description
number

screenXDpi

Declaration
set screenXDpi(v: number);
Property Value
Type Description
number

screenYDpi

Declaration
set screenYDpi(v: number);
Property Value
Type Description
number

scrollBarsStyle

Declaration
get scrollBarsStyle(): ScrollBarsStyle;

set scrollBarsStyle(value: ScrollBarsStyle);
Property Value
Type Description
ScrollBarsStyle

scrollBarWidth

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

scrollingPosition

Gets/sets the position of the scroll bars

Declaration
get scrollingPosition(): PointF;

set scrollingPosition(value: PointF);
Property Value
Type Description
PointF

Gets/sets the position of the scroll bars

scrollingSize

Gets a scroll bar length (in other words, the right-bottom point of the image fragment which is out of the visible area).

Declaration
get scrollingSize(): PointF;
Property Value
Type Description
PointF

Gets a scroll bar length (in other words, the right-bottom point of the image fragment which is out of the visible area).

status

Declaration
get status(): UpdateStatus;
Property Value
Type Description
UpdateStatus

viewportAlignment

Gets/sets a value that specifies content alignment in the control.

Declaration
get viewportAlignment(): ViewportAlignment;

set viewportAlignment(v: ViewportAlignment);
Property Value
Type Description
ViewportAlignment

Gets/sets a value that specifies content alignment in the control.

width

Declaration
get width(): any;
Property Value
Type Description
any

workspaceHeight

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

workspaceWidth

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

zoom

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

zoomConfig

Declaration
get zoomConfig(): IRangeParams;
Property Value
Type Description
IRangeParams

zoomMode

Declaration
get zoomMode(): ZoomMode;

set zoomMode(v: ZoomMode);
Property Value
Type Description
ZoomMode

zoomQuality

Declaration
get zoomQuality(): ZoomQuality;
Property Value
Type Description
ZoomQuality

Methods

_getElementBounds(element)

Declaration
protected _getElementBounds(element: any): {
        width: any;
        height: any;
        offsetWidth: any;
        offsetHeight: any;
        offsetTop: any;
        offsetLeft: any;
    };
Parameters
Type Name Description
any element
Returns
Type Description
{ width: any; height: any; offsetWidth: any; offsetHeight: any; offsetTop: any; offsetLeft: any; }

_getElementForCursor()

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

_makeInactive(domElement)

Declaration
protected _makeInactive(domElement: any): void;
Parameters
Type Name Description
any domElement
Returns
Type Description
void

_onResize(sender, updateButtonGroup)

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

_refresh()

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

_renderContent(sb)

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

_resizeContentElements()

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

_setRulersConfig(config)

Declaration
protected _setRulersConfig(config: IRulersConfig): void;
Parameters
Type Name Description
IRulersConfig config
Returns
Type Description
void

_setZoom(value, ignoreZoomConfigRestrictions)

Declaration
protected _setZoom(value: number, ignoreZoomConfigRestrictions?: boolean): void;
Parameters
Type Name Description
number value
boolean ignoreZoomConfigRestrictions
Returns
Type Description
void

_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

abort()

Declaration
abort(): void;
Returns
Type Description
void

add_onResize(h)

Declaration
add_onResize(h: any): void;
Parameters
Type Name Description
any h
Returns
Type Description
void

add_scrolled(h)

Declaration
add_scrolled(h: any): void;
Parameters
Type Name Description
any h
Returns
Type Description
void

add_statusChanged(h)

Declaration
add_statusChanged(h: any): void;
Parameters
Type Name Description
any h
Returns
Type Description
void

add_zoomed(h)

Declaration
add_zoomed(h: any): void;
Parameters
Type Name Description
any h
Returns
Type Description
void

calculateZoomByZoomMode(zoomMode, size, bestFitWhiteSpacePcArg)

Declaration
calculateZoomByZoomMode(zoomMode: ZoomMode, size?: SizeF, bestFitWhiteSpacePcArg?: number): number;
Parameters
Type Name Description
ZoomMode zoomMode
SizeF size
number bestFitWhiteSpacePcArg
Returns
Type Description
number

clearRenderCtx(ctx)

Declaration
clearRenderCtx(ctx: HTMLElement): void;
Parameters
Type Name Description
HTMLElement ctx
Returns
Type Description
void

delayedRefresh()

Indicates that the control needs to be refreshed. The actual refreshing is applied when the user does not update the control state (such as scroll position, zoom value) in one second.

Declaration
delayedRefresh(): void;
Returns
Type Description
void

dispose()

Releases all resources

Declaration
dispose(): void;
Returns
Type Description
void

getActualScrollPosition()

Declaration
getActualScrollPosition(): PointF;
Returns
Type Description
PointF

getMaxZoom()

Gets the maximum allowed zoom value.

Declaration
getMaxZoom(): number;
Returns
Type Description
number
Remarks

Zoom values are measured in percents/100. It means that value = 1 specify 100% zoom (i.e. actual size), value = 10 means 1000% zoom (10x), value = 0,5 means 50% zoom (half), etc.

getScrollBars()

Declaration
getScrollBars(): {
        vertical: number;
        horizontal: number;
    };
Returns
Type Description
{ vertical: number; horizontal: number; }

getViewportLocation()

Declaration
getViewportLocation(): PointF;
Returns
Type Description
PointF

ignoreDocumentClickOnce()

Declaration
ignoreDocumentClickOnce(): void;
Returns
Type Description
void

initialize(intervalCheckLoop)

Declaration
initialize(intervalCheckLoop?: any): void;
Parameters
Type Name Description
any intervalCheckLoop
Returns
Type Description
void

refresh()

Refreshes the control immediately.

Declaration
refresh(): void;
Returns
Type Description
void

remove_onResize(h)

Declaration
remove_onResize(h: any): void;
Parameters
Type Name Description
any h
Returns
Type Description
void

remove_scrolled(h)

Declaration
remove_scrolled(h: any): void;
Parameters
Type Name Description
any h
Returns
Type Description
void

remove_statusChanged(h)

Declaration
remove_statusChanged(h: any): void;
Parameters
Type Name Description
any h
Returns
Type Description
void

remove_zoomed(h)

Declaration
remove_zoomed(h: any): void;
Parameters
Type Name Description
any h
Returns
Type Description
void

setCursor(cursor, onBody)

Declaration
setCursor(cursor: Cursor, onBody?: boolean): void;
Parameters
Type Name Description
Cursor cursor
boolean onBody
Returns
Type Description
void

setIntervalCheckLoop(intervalCheckLoop)

Declaration
setIntervalCheckLoop(intervalCheckLoop: any): void;
Parameters
Type Name Description
any intervalCheckLoop
Returns
Type Description
void

setMaxZoom(value)

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

setZoom(zoom, params, ignoreZoomConfigRestrictions, withoutUpdate)

Declaration
setZoom(zoom: number, params: ZoomParams, ignoreZoomConfigRestrictions?: boolean, withoutUpdate?: boolean): number;
Parameters
Type Name Description
number zoom
ZoomParams params
boolean ignoreZoomConfigRestrictions
boolean withoutUpdate
Returns
Type Description
number

zoomToItems(items)

Declaration
zoomToItems(items?: BaseItem[]): void;
Parameters
Type Name Description
BaseItem[] items
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