Sprotty
Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Class. Sgraph Impl

features?

optional features: FeatureSet

Defined in: packages/sprotty/src/base/model/smodel.ts:28

Inherited from

ViewportRootElementImpl.features


id

id: string

Defined in: packages/sprotty/src/base/model/smodel.ts:27

Inherited from

ViewportRootElementImpl.id


layoutOptions?

optional layoutOptions: ModelLayoutOptions

Defined in: packages/sprotty/src/graph/sgraph.ts:39


position

position: Point = Point.ORIGIN

Defined in: packages/sprotty/src/features/viewport/viewport-root.ts:33

Inherited from

ViewportRootElementImpl.position


revision?

optional revision: number

Defined in: packages/sprotty/src/base/model/smodel.ts:167

Inherited from

ViewportRootElementImpl.revision


scroll

scroll: Point

Defined in: packages/sprotty/src/features/viewport/viewport-root.ts:31

Inherited from

ViewportRootElementImpl.scroll


size

size: Dimension = Dimension.EMPTY

Defined in: packages/sprotty/src/features/viewport/viewport-root.ts:34

Inherited from

ViewportRootElementImpl.size


type

type: string

Defined in: packages/sprotty/src/base/model/smodel.ts:26

Inherited from

ViewportRootElementImpl.type


zoom

zoom: number = 1

Defined in: packages/sprotty/src/features/viewport/viewport-root.ts:32

Inherited from

ViewportRootElementImpl.zoom


DEFAULT_FEATURES

readonly static DEFAULT_FEATURES: symbol[]

Defined in: packages/sprotty/src/features/viewport/viewport-root.ts:29

Inherited from

ViewportRootElementImpl.DEFAULT_FEATURES

Accessors

bounds

Get Signature

get bounds(): Bounds

Defined in: packages/sprotty/src/features/viewport/viewport-root.ts:40

Returns

Bounds

Set Signature

set bounds(newBounds): void

Defined in: packages/sprotty/src/features/viewport/viewport-root.ts:49

Parameters
newBounds

Bounds

Returns

void

Inherited from

ViewportRootElementImpl.bounds


index

Get Signature

get index(): ModelIndexImpl

Defined in: packages/sprotty/src/base/model/smodel.ts:44

Returns

ModelIndexImpl

Inherited from

ViewportRootElementImpl.index


root

Get Signature

get root(): SModelRootImpl

Defined in: packages/sprotty/src/base/model/smodel.ts:31

Returns

SModelRootImpl

Inherited from

ViewportRootElementImpl.root

Methods

add()

add(child, index?): void

Defined in: packages/sprotty/src/base/model/smodel.ts:74

Parameters

child

SChildElementImpl

index?

number

Returns

void

Inherited from

ViewportRootElementImpl.add


hasFeature()

hasFeature(feature): boolean

Defined in: packages/sprotty/src/base/model/smodel.ts:52

A feature is a symbol identifying some functionality that can be enabled or disabled for a model element. The set of supported features is determined by the features property.

Parameters

feature

symbol

Returns

boolean

Inherited from

ViewportRootElementImpl.hasFeature


localToParent()

localToParent(point): Bounds

Defined in: packages/sprotty/src/features/viewport/viewport-root.ts:60

Transform the given bounds from the local coordinate system of this element to the coordinate system of its parent. This function should consider any transformation that is applied to the view of this element and its contents. The base implementation assumes that this element does not define a local coordinate system, so it leaves the bounds unchanged.

Parameters

point

Point | Bounds

Returns

Bounds

Inherited from

ViewportRootElementImpl.localToParent


move()

move(child, newIndex): void

Defined in: packages/sprotty/src/base/model/smodel.ts:115

Parameters

child

SChildElementImpl

newIndex

number

Returns

void

Inherited from

ViewportRootElementImpl.move


parentToLocal()

parentToLocal(point): Bounds

Defined in: packages/sprotty/src/features/viewport/viewport-root.ts:74

Transform the given bounds from the coordinate system of this element’s parent to its local coordinate system. This function should consider any transformation that is applied to the view of this element and its contents. The base implementation assumes that this element does not define a local coordinate system, so it leaves the bounds unchanged.

Parameters

point

Point | Bounds

Returns

Bounds

Inherited from

ViewportRootElementImpl.parentToLocal


remove()

remove(child): void

Defined in: packages/sprotty/src/base/model/smodel.ts:88

Parameters

child

SChildElementImpl

Returns

void

Inherited from

ViewportRootElementImpl.remove


removeAll()

removeAll(filter?): void

Defined in: packages/sprotty/src/base/model/smodel.ts:98

Parameters

filter?

(e) => boolean

Returns

void

Inherited from

ViewportRootElementImpl.removeAll