interface-iboardviewportcommands

Interface: IBoardViewportCommands

Commands to get information and manipulate the board viewport.

Hierarchy

  • IBoardViewportCommands

Index

Methods

Methods

__mask

__mask(viewport: IRect, padding?: IOffset): void

Adds a black mask over the canvas.

experimental

Parameters:

NameType
viewportIRect
padding?IOffset

Returns: void


__unmask

__unmask(): void

Removes any mask set over the canvas.

experimental

Returns: void


get

get(): Promise<IRect>

Returns information about the current viewport position

Returns: Promise<IRect>


getScale

getScale(): Promise<number>

Returns the viewport scale (zoom level)

Returns: Promise<number>


set

set(viewport: IRect, options?: IViewportOptions): Promise<IRect>

Allows to set the board viewport

Parameters:

NameType
viewportIRect
options?IViewportOptions

Returns: Promise<IRect>


zoomToObject

zoomToObject(widget: InputWidget): Promise<void>

Zooms to a specific Widget on the board

Parameters:

NameType
widgetInputWidget

Returns: Promise<void>


Did this page help you?