@@ -4,82 +4,92 @@ import {AnnotationType, LineType, Colors, ZOrderType, ConnectorShapeType,
4
4
ConnectorPlacementType , ConnectorLabelPlacementType } from '../enums' ;
5
5
/**
6
6
* @class ConnectorAnnotationConfig
7
- * @classdesc Connector annotation configuration object. Connector annotations draws lines between two nodes of the diagram.
8
- * They are drawn on top of existing diagram layout and they don't affect nodes placement. So it is users responsibility to
9
- * preserve space between nodes for them.
7
+ * @classdesc Connector annotations draw lines between two nodes of the diagram.
8
+ * They are drawn on top of the existing diagram layout, and they don't impact
9
+ * nodes placement. So it is the user's responsibility to preserve space between nodes for them.
10
10
*
11
11
* @param {object } arg0 Object properties.
12
12
*/
13
13
export default function ConnectorAnnotationConfig ( arg0 , arg1 ) {
14
14
var property ;
15
15
16
16
/**
17
- * Annotation type. All types of annotations objects are added to `annotations` collection property of the control.
18
- * This property is needed to distinguish them when they are defined as JSON objects.
17
+ * Annotation type property explicitly defines annotation object type when
18
+ * it is defined as a JSON object. The `annotations` collection contains
19
+ * a mixture of all kinds of control annotations.
19
20
*
20
21
* @type {AnnotationType }
21
22
*/
22
23
this . annotationType = AnnotationType . Connector ;
23
24
24
25
/**
25
- * Sets annotation Z order placement relative to the diagram items. Diagram visual elements are drawn in layers on top of each other.
26
- * If you place annotations over diagram nodes then you block mouse events of UI elements in their templates.
27
- * Browsers don't support mouse events transparency consistently yet. So in order to avoid mouse events blocking of UI elements in item
28
- * templates you have to place annotation items under them or explicitly define maximum zindex for controls and make them rendered on top
29
- * of other visual elements. The control takes this into account and renders buttons panel on top of everything,
30
- * so they are never blocked by annotations drawn in front of diagram nodes.
26
+ * Sets annotation z-order placement relative to the diagram items.
27
+ * Diagram visual elements are drawn in layers on top of each other.
28
+ * If you place annotations over diagram nodes, you block mouse events
29
+ * of UI elements in nodes templates. Browsers don't support mouse events
30
+ * transparency consistently yet. So to avoid mouse events blocking UI
31
+ * elements in node templates, you have to place annotation items under
32
+ * nodes or manipulate z-index for UI interactive controls and make them
33
+ * placed on top of other visual elements. The component puts the buttons panel
34
+ * on top of everything, so annotations drawn over the diagram nodes are not blocked.
31
35
*
32
36
* @type {ZOrderType }
33
37
*/
34
38
this . zOrderType = ZOrderType . Foreground ;
35
39
36
40
/**
37
- * The start node of connection line
41
+ * The start node of the connection line
38
42
*
39
43
* @type {string }
40
44
*/
41
45
this . fromItem = null ;
42
46
43
47
/**
44
- * The end node of connection line
48
+ * The end node of the connection line
45
49
*
46
50
* @type {string }
47
51
*/
48
52
this . toItem = null ;
49
53
50
54
/**
51
- * Connector shape type defines number of lines and arrows at their ends drawn between nodes of the connector annotation.
52
- * This feature combined with basic conflict resolution, which places overlapping annotations in parallel when they overlap each other,
53
- * gives you full flexibility over variations of possible connector lines between two given nodes of diagram.
55
+ * Connector shape type defines the number of lines and arrows at their ends
56
+ * drawn between nodes of the connector annotation. This feature, combined
57
+ * with conflict resolution, places overlapping annotations in parallel.
58
+ * It gives you complete flexibility over variations of possible connector
59
+ * lines between two given diagram nodes.
54
60
*
55
61
* @type {ConnectorShapeType }
56
62
*/
57
63
this . connectorShapeType = ConnectorShapeType . OneWay ;
58
64
59
65
/**
60
- * Connector placement type defines style of connector line drawing over diagram layout. It supports two options:
61
- * the `Straight` is classic direct line connecting two nodes, this is the most expected style of connector annotation
62
- * drawing over diagram, the second style is called `Offbeat` and it is designed to dynamically adopt to nodes mutual
63
- * location and gap between them. It uses free hand line style drawing going from start to the end node. Since every diagram
64
- * is packed with various connection lines, this annotation placement style is deliberately made not straight, so it can be
65
- * noticeable on top of other lines of the diagram.
66
+ * The connector placement type defines how the component traces the connector
67
+ * line over the diagram nodes. The `Straight` is a direct line connecting two
68
+ * nodes. The`Offbeat` style is designed to dynamically tune connector line
69
+ * placement depending on the relative position of nodes and the gap between them.
70
+ * It uses free-hand line style drawing going from start to the end node.
71
+ * Since every diagram is packed with various connection lines, this annotation
72
+ * placement style is deliberately made not straight so that it can be
73
+ * noticeable on top of other diagram lines.
66
74
*
67
75
* @type {ConnectorPlacementType }
68
76
*/
69
77
this . connectorPlacementType = ConnectorPlacementType . Offbeat ;
70
78
71
79
/**
72
- * Label placement relative to connector annotation. Connector annotation is bound and drawn between two nodes
73
- * defined by two properties: `fromItem` and `toItem`. Label can be placed close to "start", "end" nodes or in between of them
74
- * along the connector line.
80
+ * Label placement relative to connector annotation. Connector annotation is
81
+ * bound and drawn between two nodes defined by the `fromItem` and the `toItem`
82
+ * properties. The component places the label along the connector line close
83
+ * to the start, the end nodes, or between them.
75
84
*
76
85
* @type {ConnectorLabelPlacementType }
77
86
*/
78
87
this . labelPlacementType = ConnectorLabelPlacementType . Between ;
79
88
80
89
/**
81
- * Connector line end points offset. By default connection lines start from the margin of the node's rectangle.
82
- * If offset is positive then start point goes from outside of the rectangle, if it is negative then it starts from inside of the nodes rectangle.
90
+ * Connection lines start from the margin of the node's rectangle. If the offset is positive,
91
+ * the connection line has a gap between its endpoints and the node's rectangles.
92
+ * If it is negative, the connection line overlaps the node's rectangle and starts from inside them.
83
93
*
84
94
* @type {Thickness }
85
95
*/
@@ -107,19 +117,23 @@ export default function ConnectorAnnotationConfig(arg0, arg1) {
107
117
this . lineType = LineType . Solid ;
108
118
109
119
/**
110
- * If true then annotated nodes are shown full size regardless of controls auto fit mode and available screen space.
120
+ * If true, annotated nodes are shown in their expanded form using item
121
+ * templates regardless of controls autofit mode and available screen space.
122
+ *
111
123
* @type {boolean }
112
124
*/
113
125
this . selectItems = true ;
114
126
115
127
/**
116
- * Label. Label styled with css class name "bp-connector-label".
128
+ * Label. Label styled with "bp-connector-label" css class.
129
+ *
117
130
* @type {string }
118
131
*/
119
132
this . label = null ;
120
133
121
134
/**
122
135
* Label size
136
+ *
123
137
* @type {Size }
124
138
*/
125
139
this . labelSize = new Size ( 60 , 30 ) ;
0 commit comments