Skip to content

Commit c715b6f

Browse files
Added api annotations to enumerations and updated merge.js
1 parent b491082 commit c715b6f

File tree

3 files changed

+59
-17
lines changed

3 files changed

+59
-17
lines changed

merge.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,10 @@ function read_enumerations(files, enums) {
111111

112112
function getEnumValues(fileName) {
113113
const fileContent = fs.readFileSync(fileName, "utf8");
114-
let fileText = fileContent.substring(fileContent.indexOf("*/") + 2);
114+
let fileText = fileContent.replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/gi, () => {
115+
return '';
116+
});
117+
115118
const chars = ['\uFEFF', "\n", "\r", "\t", " "];
116119
chars.forEach(item => {
117120
fileText = fileText.replaceAll(item, '');

src.primitives/enums/AdviserPlacementType.js

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,28 @@
1-
/*
2-
Enum: primitives.common.AdviserPlacementType
3-
Defines item placement in tree relative to parent.
4-
5-
Auto - Layout manager defined.
6-
Left - Item placed on the left side of parent.
7-
Right - Item placed on the right side of parent.
8-
*/
1+
/**
2+
* @typedef {number} AdviserPlacementType
3+
**/
4+
5+
6+
/**
7+
* Defines leftward or rightward item placement relative to the referenced item.
8+
* In case of assitants and advisers the referenced item is their imediate parent.
9+
* In case of family diagram the referenced item is spouse or sibling in the row.
10+
*
11+
* @enum {AdviserPlacementType}
12+
*/
913
primitives.common.AdviserPlacementType =
1014
{
15+
/**
16+
* Auto select by layout manager
17+
*/
1118
Auto: 0,
19+
/**
20+
* Left side
21+
*/
1222
Left: 2,
23+
/**
24+
* Right side
25+
*/
1326
Right: 3
1427
};
1528

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,42 @@
1-
/*
2-
Enum: primitives.common.AnnotationType
3-
Defines type of annotation object.
4-
5-
Connector - Connector lines between two rectangular areas.
6-
Shape - Shape around rectanglur area.
7-
HighlightPath - Use highlight properties for connector lines between items.
8-
*/
1+
/**
2+
* @typedef {number} AnnotationType
3+
**/
4+
5+
6+
/**
7+
Defines type of on-screen and in-layout annotation object. Annotations are geometrical
8+
figures drawn around or bound to existing nodes of the diagram.
9+
*
10+
* @enum {AnnotationType}
11+
*/
912
primitives.common.AnnotationType =
1013
{
14+
/**
15+
* Connector lines between two nodes of the diagram. They are drawn on top of existing
16+
* diagram layout and they don't affect nodes placement. So it is users responsibility to
17+
* prserve space between nodes for them.
18+
*/
1119
Connector: 0,
20+
/**
21+
* Shape annotation is a possibility to draw some geometrical
22+
* shapes over several nodes of the diagram.
23+
*/
1224
Shape: 1,
25+
/**
26+
* Highlight path annotation traces path between given sequence of nodes
27+
* over existing connector lines in the diagram.
28+
*/
1329
HighlightPath: 2,
30+
/**
31+
* In-layout label annotation. Label anntations are placed in layout between nodes,
32+
* they preserve space between nodes, so they don't overlap neighbouring nodes.
33+
* Label annotations are designed for autoplacement and bundling of connection lines between
34+
* nodes when needed.
35+
*/
1436
Label: 3,
37+
/**
38+
* Background annotation highlights nodes via drawing rectangular shape in background.
39+
* If shapes overlap the same style neighbouring shapes they are merged into one continuous shape.
40+
*/
1541
Background: 4
1642
};

0 commit comments

Comments
 (0)