Skip to content

Commit f77ea6f

Browse files
Merge pull request #91 from BasicPrimitives/annotations
Updated annotations
2 parents cad96c2 + ea299dd commit f77ea6f

22 files changed

+1308
-1238
lines changed

apireference/algorithms.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ Callback for iterating family nodes level by level
280280

281281
`loopLevels(thisArg, parentAligned, onItem)`
282282

283-
Function loops through nodes of family structure level by level.
283+
Loops through nodes of family structure level by level. This function aligns nodes top or bottom.
284284

285285
| Param | Type | Default | Description |
286286
| --- | --- | --- | --- |
@@ -293,7 +293,7 @@ Function loops through nodes of family structure level by level.
293293

294294
Callback for iterating family nodes level by level
295295

296-
Returns: `number` - returns `break` to break the loop and exit, `skip` to skip node's branch traversing.
296+
Returns: `number` - returns break to break the loop and exit. returns skip to skip node's branch traversing.
297297

298298
| Param | Type | Default | Description |
299299
| --- | --- | --- | --- |
@@ -303,7 +303,7 @@ Callback for iterating family nodes level by level
303303

304304
`loopNeighbours(thisArg, itemid, onItem)`
305305

306-
Loops through the node neighbors of the family structure level by level
306+
Loops through the node neighbours of the family structure level by level
307307

308308
| Param | Type | Default | Description |
309309
| --- | --- | --- | --- |

apireference/configs.md

+78-77
Large diffs are not rendered by default.

apireference/enums.md

+51-51
Large diffs are not rendered by default.

apireference/famdiagram.md

+120-120
Large diffs are not rendered by default.

apireference/orgdiagram.md

+120-120
Large diffs are not rendered by default.

apireference/structures.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ Vertical Interval
453453

454454

455455
## <a name="RenderEventArgs" id="RenderEventArgs">RenderEventArgs</a>
456-
This is object parameter of rendering callback function
456+
The render event arguments contains parameters of rendering callback function
457457

458458
`RenderEventArgs`
459459

index.html

-6
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,6 @@
118118
{
119119
label: "Integration",
120120
items: [
121-
{
122-
label: "AngularJS Directive Example",
123-
frameworks: {
124-
javascript: "samples/angularjs.directives/CaseAngularJSFirstOrganizationalChartDirective.html"
125-
}
126-
},
127121
{
128122
label: "jQuery UI Widget Example",
129123
frameworks: {
Loading

src/configs/BackgroundAnnotationConfig.js

+22-15
Original file line numberDiff line numberDiff line change
@@ -3,50 +3,56 @@ import { AnnotationType, ZOrderType, LineType } from '../enums';
33

44
/**
55
* @class BackgroundAnnotationConfig
6-
* @classdesc Background annotation draws rectangular shape around annotated items. Annotations borders are offset around items, so if
7-
* two annotations overlap each other they are merged into one continuos shape having single border line.
6+
* @classdesc Background annotation draws a rectangular shape around annotated items.
7+
* Annotations borders are offset around nodes, so if two annotations overlap,
8+
* they are merged into one continuous shape with a single borderline.
89
*
910
* @param {object} arg0 Object properties.
1011
*/
1112
export default function BackgroundAnnotationConfig(arg0) {
1213
var property;
1314

1415
/**
15-
* Annotation type. All types of annotations objects are added to `annotations` collection property of the control.
16-
* This property is needed to distinguish them when they are defined as JSON objects.
16+
* Annotation type property explicitly defines annotation object type when
17+
* it is defined as a JSON object. The `annotations` collection contains
18+
* a mixture of all kinds of control annotations.
1719
*
1820
* @type {AnnotationType}
1921
*/
2022
this.annotationType = AnnotationType.Background;
2123

2224
/**
23-
* Collection of nodes ids this background annotation is drawn for.
25+
* The `items` Collection contains nodes ids the background annotation is drawn for.
2426
*
2527
* @type {string[]}
2628
*/
2729
this.items = [];
2830

2931
/**
30-
* If this property is true then background annotation includes all descendants of every item in `items` collection. It works in {OrgDiagram} only.
32+
* If this property is true, background annotation includes all descendants of every
33+
* item in the `items` collection. It works in {OrgDiagram} only.
3134
*
3235
* @type {boolean}
3336
*/
3437
this.includeChildren = false;
3538

3639
/**
37-
* Sets annotation Z order placement relative to the diagram items. Diagram visual elements are drawn in layers on top of each other.
38-
* If you place annotations over diagram nodes then you block mouse events of UI elements in their templates.
39-
* Browsers don't support mouse events transparency consistently yet. So in order to avoid mouse events blocking of UI elements in item
40-
* templates you have to place annotation items under them or explicitly define maximum zindex for controls and make them rendered on top
41-
* of other visual elements. The control takes this into account and renders buttons panel on top of everything,
42-
* so they are never blocked by annotations drawn in front of diagram nodes.
40+
* Sets annotation z-order placement relative to the diagram items.
41+
* Diagram visual elements are drawn in layers on top of each other.
42+
* If you place annotations over diagram nodes, you block mouse events
43+
* of UI elements in nodes templates. Browsers don't support mouse events
44+
* transparency consistently yet. So to avoid mouse events blocking UI
45+
* elements in node templates, you have to place annotation items under
46+
* nodes or manipulate z-index for UI interactive controls and make them
47+
* placed on top of other visual elements. The component puts the buttons panel
48+
* on top of everything, so annotations drawn over the diagram nodes are not blocked.
4349
*
4450
* @type {ZOrderType}
4551
*/
4652
this.zOrderType = ZOrderType.Auto;
4753

4854
/**
49-
* Sets background offset around annotated items.
55+
* Sets background borderline offset around annotated items.
5056
*
5157
* @type {Thickness}
5258
*/
@@ -67,7 +73,7 @@ export default function BackgroundAnnotationConfig(arg0) {
6773
this.opacity = 1;
6874

6975
/**
70-
* Shape border line color
76+
* Border line color
7177
*
7278
* @type {string}
7379
*/
@@ -88,7 +94,8 @@ export default function BackgroundAnnotationConfig(arg0) {
8894
this.lineType = LineType.Solid;
8995

9096
/**
91-
* If true then annotated nodes are shown full size regardless of controls auto fit mode and available screen space.
97+
* If true, annotated nodes are shown in their expanded form using item
98+
* templates regardless of controls autofit mode and available screen space.
9299
* @type {boolean}
93100
*/
94101
this.selectItems = false;

src/configs/ConnectorAnnotationConfig.js

+43-29
Original file line numberDiff line numberDiff line change
@@ -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
*/
1313
export 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

Comments
 (0)