Class: DiagramState
Implements
Constructors
constructor
• new DiagramState(rootStore
)
Parameters
Name | Type |
---|---|
rootStore | RootStore |
Accessors
importGenerationId
• get
importGenerationId(): number
Returns
number
offset
• get
offset(): Point
Returns
Implementation of
IUserInteractionTranslateAndZoom.offset
ref
• get
ref(): HtmlElementRefState
Returns
zoom
• get
zoom(): number
Returns
number
Implementation of
IUserInteractionTranslateAndZoom.zoom
Methods
export
▸ export(): IDiagramState
Returns
getPositionByPointer
▸ getPositionByPointer(pointerPosition
): Point
Get position on Diagram in its coordinates system (including zoom) by mouse/touch position.
Parameters
Name | Type | Description |
---|---|---|
pointerPosition | Point | position of mouse or finger on the screen |
Returns
getRenderedZoom
▸ getRenderedZoom(): null
| number
Returns
null
| number
import
▸ import(state?
): void
Parameters
Name | Type |
---|---|
state? | IDiagramState |
Returns
void
incrementImportGenerationId
▸ incrementImportGenerationId(): void
Returns
void
setOffset
▸ setOffset(newOffset
): void
Parameters
Name | Type |
---|---|
newOffset | undefined | null | Point |
Returns
void
Implementation of
IUserInteractionTranslate.setOffset
setTransformation
▸ setTransformation(newOffset
, newZoom
): void
Parameters
Name | Type |
---|---|
newOffset | Point |
newZoom | number |
Returns
void
setZoom
▸ setZoom(newZoom
): void
Parameters
Name | Type |
---|---|
newZoom | undefined | null | number |
Returns
void
translate
▸ translate(translateBy
): void
Parameters
Name | Type |
---|---|
translateBy | Point |
Returns
void
translateAndZoomInto
▸ translateAndZoomInto(translateBy
, pointToZoomInto
, zoomMultiplicator
): void
Parameters
Name | Type |
---|---|
translateBy | Point |
pointToZoomInto | Point |
zoomMultiplicator | number |
Returns
void
Implementation of
IUserInteractionTranslateAndZoom.translateAndZoomInto
zoomIn
▸ zoomIn(): void
Returns
void
zoomInto
▸ zoomInto(pointToZoomInto
, zoomMultiplicator
): void
Parameters
Name | Type |
---|---|
pointToZoomInto | Point |
zoomMultiplicator | number |
Returns
void
zoomIntoCenter
▸ zoomIntoCenter(zoomMultiplicator
): void
Parameters
Name | Type |
---|---|
zoomMultiplicator | number |
Returns
void
zoomOut
▸ zoomOut(): void
Returns
void
zoomToFit
▸ zoomToFit(): void
Returns
void