Class: NodeState
Constructors
constructor
• new NodeState(rootStore
, id
, state?
)
Parameters
Name | Type |
---|---|
rootStore | RootStore |
id | string |
state? | INodeStateWithoutId |
Accessors
componentDefinition
• get
componentDefinition(): VisualComponentState
<INodeVisualComponentProps
<INodeComponentSettings
>, INodeComponentSettings
>
Returns
VisualComponentState
<INodeVisualComponentProps
<INodeComponentSettings
>, INodeComponentSettings
>
connectedExternalPorts
• get
connectedExternalPorts(): Dictionary
<PortState
[]>
Returns
connectedLinks
• get
connectedLinks(): LinkState
[]
Returns
data
• get
data(): any
Returns
any
hovered
• get
hovered(): boolean
Returns
boolean
• set
hovered(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
id
• get
id(): string
Returns
string
isDragActive
• get
isDragActive(): boolean
Returns
boolean
• set
isDragActive(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
isDragEnabled
• get
isDragEnabled(): boolean
Returns
boolean
isSelectionEnabled
• get
isSelectionEnabled(): boolean
Returns
boolean
label
• get
label(): undefined
| string
Returns
undefined
| string
ports
• get
ports(): ReadonlyMap
<string
, PortState
>
Returns
ReadonlyMap
<string
, PortState
>
position
• get
position(): Point
Returns
ref
• get
ref(): HtmlElementRefState
Returns
selected
• get
selected(): boolean
Returns
boolean
• set
selected(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
transformString
• get
transformString(): string
Returns
string
type
• get
type(): string
Returns
string
Methods
addPort
▸ addPort(port
): SuccessOrErrorResult
<PortState
, undefined
>
Parameters
Name | Type |
---|---|
port | IPortState |
Returns
SuccessOrErrorResult
<PortState
, undefined
>
export
▸ export(): INodeExport
Returns
getPort
▸ getPort(portId
): undefined
| PortState
Parameters
Name | Type |
---|---|
portId | string |
Returns
undefined
| PortState
getPortOrThrowException
▸ getPortOrThrowException(portId
): PortState
Parameters
Name | Type |
---|---|
portId | string |
Returns
import
▸ import(newState?
): void
Parameters
Name | Type |
---|---|
newState? | INodeStateWithoutId |
Returns
void
moveBy
▸ moveBy(vector
, ignoreSnapping?
): undefined
| Point
Parameters
Name | Type | Default value | Description |
---|---|---|---|
vector | Point | undefined | vector to move node by |
ignoreSnapping | boolean | false | do not take into account snapping to grid |
Returns
undefined
| Point
remainder in case snap to grid is turned on. For example if vector would be [3,9], node current position [10,10] and snap [5,5], the node position would be set to [10,15] and remainder equals [3,4]
recalculatePortsOffset
▸ recalculatePortsOffset(): void
Returns
void
removePort
▸ removePort(portId
): boolean
Parameters
Name | Type |
---|---|
portId | string |
Returns
boolean
setData
▸ setData(value?
): undefined
| PropertyChange
<any
>
Parameters
Name | Type |
---|---|
value? | any |
Returns
undefined
| PropertyChange
<any
>
setIsDragEnabled
▸ setIsDragEnabled(value
): undefined
| PropertyChange
<undefined
| boolean
>
Parameters
Name | Type |
---|---|
value | undefined | null | boolean |
Returns
undefined
| PropertyChange
<undefined
| boolean
>
setIsSelectionEnabled
▸ setIsSelectionEnabled(value
): undefined
| PropertyChange
<undefined
| boolean
>
Parameters
Name | Type |
---|---|
value | undefined | null | boolean |
Returns
undefined
| PropertyChange
<undefined
| boolean
>
setLabel
▸ setLabel(value?
): undefined
| PropertyChange
<undefined
| string
>
Parameters
Name | Type |
---|---|
value? | null | string |
Returns
undefined
| PropertyChange
<undefined
| string
>
setPorts
▸ setPorts(nodePorts?
): void
Parameters
Name | Type |
---|---|
nodePorts? | IPortState [] |
Returns
void
setPosition
▸ setPosition(newPosition
, ignoreSnapping?
): undefined
| PropertyChange
<Point
>
Parameters
Name | Type | Default value | Description |
---|---|---|---|
newPosition | Point | undefined | new position |
ignoreSnapping | boolean | false | do not take into account snapping to grid |
Returns
undefined
| PropertyChange
<Point
>
undefined
if position did not change
setType
▸ setType(value
): undefined
| PropertyChange
<undefined
| string
>
Parameters
Name | Type |
---|---|
value | undefined | null | string |
Returns
undefined
| PropertyChange
<undefined
| string
>