Namespace Joint.dia.pn
Holds functionality related to Petri net diagrams.
Defined in: joint.dia.pn.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
<static> |
Joint.dia.pn.arrow
Predefined arrow.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
Joint.dia.pn.Event.create(properties)
Petri net event.
|
<static> |
Joint.dia.pn.Place.create(properties)
Petri net place.
|
Field Detail
<static>
Joint.dia.pn.arrow
Predefined arrow.
p1.joint(e2, Joint.dia.pn.arrow);
Method Detail
<static>
Joint.dia.pn.Event.create(properties)
Petri net event.
var p1 = Joint.dia.pn.Event.create({ rect: {x: 120, y: 70, width: 50, height: 7}, label: "e1", attrs: { stroke: "blue", fill: "yellow" } });
- Parameters:
- {Object} properties
- {Object} properties.rect
- Bounding box of the event (e.g. {x: 50, y: 100, width: 30, height: 100}).
- {String} properties.label Optional
- The name of the event.
- {Object} properties.attrs Optional
- SVG attributes of the appearance of the event.
<static>
Joint.dia.pn.Place.create(properties)
Petri net place.
var p1 = Joint.dia.pn.Place.create({ position: {x: 120, y: 70}, radius: 25, tokenRadius: 4, tokens: 3, label: "p1", attrs: { stroke: "blue" }, tokenAttrs: { fill: "red" } });
- Parameters:
- {Object} properties
- {Object} properties.position
- Position of the place (e.g. {x: 50, y: 100}).
- {Number} properties.radius Optional
- Radius of the circle of the place.
- {Number} properties.tokenRadius Optional
- Radius of the tokens of the place.
- {Number} properties.tokens Optional
- Number of tokens.
- {String} properties.label Optional
- The name of the place.
- {Object} properties.attrs Optional
- SVG attributes of the appearance of the place.
- {Object} properties.tokenAttrs Optional
- SVG attributes of the appearance of the token circles.