Namespace Joint.dia.fsa
Holds functionality related to FSA diagrams.
Defined in: joint.dia.fsa.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
<static> |
Joint.dia.fsa.arrow
Predefined arrow.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
Joint.dia.fsa.EndState.create(properties)
Finite state machine end state.
|
<static> |
Joint.dia.fsa.StartState.create(properties)
Finite state machine start state.
|
<static> |
Joint.dia.fsa.State.create(properties)
Finite state machine state.
|
Field Detail
<static>
Joint.dia.fsa.arrow
Predefined arrow. You are free to use this arrow as the option parameter to joint method.
var arrow = Joint.dia.fsa.arrow; s1.joint(s2, (arrow.label = "anEvent", arrow));
Method Detail
<static>
Joint.dia.fsa.EndState.create(properties)
Finite state machine end state.
var s0 = Joint.dia.fsa.EndState.create({ position: {x: 120, y: 70}, radius: 15, innerRadius: 8, attrs: { stroke: "blue", fill: "yellow" }, innerAttrs: { fill: "red" } });
- Parameters:
- {Object} properties
- {Object} properties.position
- Position of the end state (e.g. {x: 50, y: 100}).
- {Number} properties.radius Optional
- Radius of the circle of the end state.
- {Number} properties.innerRadius Optional
- Radius of the inner circle of the end state.
- {Object} properties.attrs Optional
- SVG attributes of the appearance of the end state.
- {Object} properties.innerAttrs Optional
- SVG attributes of the appearance of the inner circle of the end state.
<static>
Joint.dia.fsa.StartState.create(properties)
Finite state machine start state.
var s0 = Joint.dia.fsa.StartState.create({ position: {x: 120, y: 70}, radius: 15, attrs: { stroke: "blue", fill: "yellow" } });
- Parameters:
- {Object} properties
- {Object} properties.position
- Position of the start state (e.g. {x: 50, y: 100}).
- {Number} properties.radius Optional
- Radius of the circle of the start state.
- {Object} properties.attrs Optional
- SVG attributes of the appearance of the start state.
<static>
Joint.dia.fsa.State.create(properties)
Finite state machine state.
var s1 = Joint.dia.fsa.State.create({ position: {x: 120, y: 70}, label: "state 1", radius: 40, attrs: { stroke: "blue", fill: "yellow" } });
- Parameters:
- {Object} properties
- {Object} properties.position
- Position of the State (e.g. {x: 50, y: 100}).
- {Number} properties.radius Optional
- Radius of the circle of the state.
- {String} properties.label Optional
- The name of the state.
- {Number} properties.labelOffsetX Optional
- Offset in x-axis of the label from the state circle origin.
- {Number} properties.labelOffsetY Optional
- Offset in y-axis of the label from the state circle origin.
- {Object} properties.attrs Optional
- SVG attributes of the appearance of the state.