@@ -4,82 +4,92 @@ import {AnnotationType, LineType, Colors, ZOrderType, ConnectorShapeType,
44 ConnectorPlacementType , ConnectorLabelPlacementType } from '../enums' ;
55/**
66 * @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.
1010 *
1111 * @param {object } arg0 Object properties.
1212 */
1313export default function ConnectorAnnotationConfig ( arg0 , arg1 ) {
1414 var property ;
1515
1616 /**
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.
1920 *
2021 * @type {AnnotationType }
2122 */
2223 this . annotationType = AnnotationType . Connector ;
2324
2425 /**
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.
3135 *
3236 * @type {ZOrderType }
3337 */
3438 this . zOrderType = ZOrderType . Foreground ;
3539
3640 /**
37- * The start node of connection line
41+ * The start node of the connection line
3842 *
3943 * @type {string }
4044 */
4145 this . fromItem = null ;
4246
4347 /**
44- * The end node of connection line
48+ * The end node of the connection line
4549 *
4650 * @type {string }
4751 */
4852 this . toItem = null ;
4953
5054 /**
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.
5460 *
5561 * @type {ConnectorShapeType }
5662 */
5763 this . connectorShapeType = ConnectorShapeType . OneWay ;
5864
5965 /**
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.
6674 *
6775 * @type {ConnectorPlacementType }
6876 */
6977 this . connectorPlacementType = ConnectorPlacementType . Offbeat ;
7078
7179 /**
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.
7584 *
7685 * @type {ConnectorLabelPlacementType }
7786 */
7887 this . labelPlacementType = ConnectorLabelPlacementType . Between ;
7988
8089 /**
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.
8393 *
8494 * @type {Thickness }
8595 */
@@ -107,19 +117,23 @@ export default function ConnectorAnnotationConfig(arg0, arg1) {
107117 this . lineType = LineType . Solid ;
108118
109119 /**
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+ *
111123 * @type {boolean }
112124 */
113125 this . selectItems = true ;
114126
115127 /**
116- * Label. Label styled with css class name "bp-connector-label".
128+ * Label. Label styled with "bp-connector-label" css class.
129+ *
117130 * @type {string }
118131 */
119132 this . label = null ;
120133
121134 /**
122135 * Label size
136+ *
123137 * @type {Size }
124138 */
125139 this . labelSize = new Size ( 60 , 30 ) ;
0 commit comments