nx.graphic.Stage - Next UI Toolkit

#

API Docs for: trial
Show: Inherited Protected Private Deprecated

# nx.graphic.Stage Class

Extends nx.ui.Component
Module: nx.graphic

SVG root component

- Index
- Methods
- Properties

## Item Index

### Methods

- addDef
- addDefString
- attach
- clearBinding
- destroy
- detach
- dispose
- getBinding
- getContainer
- getContentBound
- notify
- onAttach
- onChildAttach
- onChildDetach
- onDetach
- register
- resolve
- setBinding
- unregister
- unwatch

### Properties

- animating
- count
- disableUpdateStageScale false
- height
- matrix nx.geometry.Matrix.I
- matrixObject
- maxScale
- minScale
- model
- owner
- padding 0
- parent
- scalable
- scalable
- stage
- stageScale
- width

## Methods

### `addDef`

(

- `el`

)

Add svg def element into the stage

#### Parameters:

- `el` SVGDOM

### `addDefString`

(

- `str`

)

Add svg def element into the stage in string format

#### Parameters:

- `str` String

### `attach`

(

- `parent`
- `index`

)

Inherited from nx.ui.AbstractComponent:

Attach the component to parent.

#### Parameters:

- `parent` Object
- `index` Object

### `clearBinding`

(

- `prop`

)

Inherited from nx.Observable:

Clear binding for specified property.

#### Parameters:

- `prop` Object

### ``

(

- `names`
- `handler`
- `context`

)

Inherited from nx.Observable:

#### Parameters:

- `names` Object
- `handler` Object
- `context` Object

### `destroy`

()

Inherited from nx.ui.AbstractComponent:

Destroy the component.

### `detach`

()

Inherited from nx.ui.AbstractComponent:

Detach the component from parent.

### `dispose`

()

Inherited from nx.Observable

Dispose the component.

### `getBinding`

(

- `prop`

)

Inherited from nx.Observable:

Get existing binding object for specified property.

#### Parameters:

- `prop` Object

#### Returns:

:

### `getContainer`

(

- `comp`

)
nx.dom.Element

Inherited from nx.ui.AbstractComponent:

Get the container for component.

#### Parameters:

- `comp` Object

#### Returns:

nx.dom.Element:

### `getContentBound`

() Left: number, top: number, width: Number, height: Number

Get content's relative bound

#### Returns:

Left: number, top: number, width: Number, height: Number:

}

### `notify`

(

- `names`
- `oldValue`

)

Inherited from nx.Observable:

#### Parameters:

- `names` Object
- `oldValue` Object

### `onAttach`

()

Inherited from nx.ui.AbstractComponent:

Template method for component attach.

### `onChildAttach`

()

Inherited from nx.ui.AbstractComponent:

Template method for child component attach.

### `onChildDetach`

()

Inherited from nx.ui.AbstractComponent:

Template method for child component detach.

### `onDetach`

()

Inherited from nx.ui.AbstractComponent:

Template method for component detach.

### `register`

(

- `name`
- `value`
- `force`

)

Inherited from nx.ui.AbstractComponent:

Register a resource.

#### Parameters:

- `name` Object
- `value` Object
- `force` Object

### `resolve`

(

- `name`

)
Any

Inherited from nx.ui.AbstractComponent:

Resolve a resource.

#### Parameters:

- `name` Object

#### Returns:

Any:

### `setBinding`

(

- `prop`
- `expr`
- `source`

)

Inherited from nx.Observable:

Set binding for specified property.

#### Parameters:

- `prop` Object
- `expr` Object
- `source` Object

### `unregister`

(

- `name`

)

Inherited from nx.ui.AbstractComponent:

Unregister a resource.

#### Parameters:

- `name` Object

### `unwatch`

(

- `names`
- `handler`
- `context`

)

Inherited from nx.Observable:

#### Parameters:

- `names` Object
- `handler` Object
- `context` Object

## Properties

### `animating`

Boolean

Is an animation in progress?

### `count`

nx.data.Collection

Inherited from nx.ui.AbstractComponent:

### `disableUpdateStageScale false`

Boolean

Disable notify stageScale

### `height`

Unknown

set/get stage's height

### `matrix nx.geometry.Matrix.I`

nx.geometry.Math

Stage transform matrix

### `matrixObject`

Unknown

Matrix Object

### `maxScale`

Number

Topology max scaling

### `minScale`

Number

Topology min scaling

### `model`

Any

Inherited from nx.ui.AbstractComponent:

### `owner`

nx.ui.AbstractComponent

Inherited from nx.ui.AbstractComponent:

### `padding 0`

Number

Stage padding

### `parent`

nx.ui.AbstractComponent

Inherited from nx.ui.AbstractComponent:

### `scalable`

Boolean

Set/get topology's scalability

### `scalable`

Boolean

Get the viewbox of current stage position.

### `stage`

Unknown

get content group element

### `stageScale`

Number

Stage scale

### `width`

Unknown

set/get stage's width