@hpcc-js/graph 3.7.1 → 3.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/LICENSE +43 -43
  2. package/README.md +256 -256
  3. package/dist/assets/dagre-B-z4SP0u.js.map +1 -1
  4. package/dist/assets/graphviz-BK7FEJlA.js.map +1 -0
  5. package/dist/index.js +25 -25
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.umd.cjs +21 -21
  8. package/dist/index.umd.cjs.map +1 -1
  9. package/package.json +9 -9
  10. package/src/AdjacencyGraph.ts +224 -224
  11. package/src/Edge.css +22 -22
  12. package/src/Edge.ts +257 -257
  13. package/src/Graph.css +18 -18
  14. package/src/Graph.ts +1077 -1077
  15. package/src/GraphData.ts +187 -187
  16. package/src/GraphLayouts.ts +214 -214
  17. package/src/Sankey.css +44 -44
  18. package/src/Sankey.ts +304 -304
  19. package/src/Subgraph.css +9 -9
  20. package/src/Subgraph.ts +165 -165
  21. package/src/Vertex.css +2 -2
  22. package/src/Vertex.ts +282 -282
  23. package/src/__package__.ts +3 -3
  24. package/src/__tests__/data.ts +444 -444
  25. package/src/__tests__/index.ts +1 -1
  26. package/src/__tests__/test1.ts +18 -18
  27. package/src/__tests__/test2.ts +80 -80
  28. package/src/__tests__/test3.ts +46 -46
  29. package/src/__tests__/test4.ts +66 -66
  30. package/src/__tests__/test5.ts +85 -85
  31. package/src/common/graphT.css +38 -38
  32. package/src/common/graphT.ts +1363 -1363
  33. package/src/common/index.ts +3 -3
  34. package/src/common/layouts/circle.ts +37 -37
  35. package/src/common/layouts/dagre.ts +145 -145
  36. package/src/common/layouts/dagreWorker.ts +24 -24
  37. package/src/common/layouts/forceDirected.ts +117 -117
  38. package/src/common/layouts/forceDirectedWorker.ts +22 -22
  39. package/src/common/layouts/geoForceDirected.ts +112 -112
  40. package/src/common/layouts/graphviz.ts +137 -137
  41. package/src/common/layouts/graphvizWorker.ts +27 -27
  42. package/src/common/layouts/index.ts +7 -7
  43. package/src/common/layouts/layout.ts +147 -147
  44. package/src/common/layouts/null.ts +39 -39
  45. package/src/common/layouts/placeholders.ts +113 -113
  46. package/src/common/layouts/tree.ts +326 -326
  47. package/src/common/layouts/workers/dagre.ts +46 -46
  48. package/src/common/layouts/workers/dagreOptions.ts +35 -35
  49. package/src/common/layouts/workers/forceDirected.ts +38 -38
  50. package/src/common/layouts/workers/forceDirectedOptions.ts +30 -30
  51. package/src/common/layouts/workers/graphviz.ts +225 -225
  52. package/src/common/layouts/workers/graphvizOptions.ts +70 -70
  53. package/src/common/liteMap.ts +72 -72
  54. package/src/common/liteSVGZooom.ts +61 -61
  55. package/src/common/sankeyGraph.css +44 -44
  56. package/src/common/sankeyGraph.ts +345 -345
  57. package/src/html/annotation.ts +71 -71
  58. package/src/html/component.ts +18 -18
  59. package/src/html/edge.ts +15 -15
  60. package/src/html/graphHtml.ts +11 -11
  61. package/src/html/graphHtmlT.ts +117 -117
  62. package/src/html/icon.ts +64 -64
  63. package/src/html/image.ts +26 -26
  64. package/src/html/imageChar.ts +18 -18
  65. package/src/html/index.ts +8 -8
  66. package/src/html/intersection.ts +110 -110
  67. package/src/html/shape.ts +141 -141
  68. package/src/html/text.ts +59 -59
  69. package/src/html/textBox.ts +45 -45
  70. package/src/html/vertex.ts +67 -67
  71. package/src/index.ts +10 -10
  72. package/src/react/dataGraph.ts +345 -345
  73. package/src/react/graphReact.ts +177 -177
  74. package/src/react/graphReactT.ts +44 -44
  75. package/src/react/index.ts +4 -4
  76. package/src/react/subgraph.tsx +30 -30
  77. package/src/react/vertex.tsx +31 -31
  78. package/types/Edge.d.ts +1 -1
  79. package/types/Graph.d.ts +1 -1
  80. package/types/Sankey.d.ts +1 -1
  81. package/types/Subgraph.d.ts +1 -1
  82. package/types/Vertex.d.ts +1 -1
  83. package/dist/assets/graphviz-BvkMHneZ.js.map +0 -1
package/src/Edge.ts CHANGED
@@ -1,257 +1,257 @@
1
- import { Platform, SVGWidget, TextBox, Widget } from "@hpcc-js/common";
2
- import { curveBasis as d3CurveBasis, curveBundle as d3CurveBundle, curveCardinal as d3CurveCardinal, curveCatmullRom as d3CurveCatmullRom, curveLinear as d3CurveLinear, line as d3Line } from "d3-shape";
3
-
4
- import "../src/Edge.css";
5
-
6
- const Curve = {
7
- basis: d3CurveBasis,
8
- bundle: d3CurveBundle,
9
- cardinal: d3CurveCardinal,
10
- catmullRom: d3CurveCatmullRom,
11
- linear: d3CurveLinear
12
- };
13
-
14
- export class Edge extends SVGWidget {
15
- protected _points: any[];
16
- protected _weight: number;
17
- protected _strokeDasharray: number[];
18
- protected _hidden: boolean;
19
- protected _textBox: TextBox;
20
- protected _sourceVertex: Widget;
21
- protected _targetVertex: Widget;
22
- protected _elementPath;
23
- protected _graphID;
24
-
25
- constructor() {
26
- super();
27
-
28
- this._points = [];
29
- this._weight = 100;
30
- this._strokeDasharray = null;
31
- this._hidden = false;
32
-
33
- this._textBox = new TextBox()
34
- .padding(0)
35
- ;
36
- }
37
-
38
- graphID(_) {
39
- if (!arguments.length) return this._graphID;
40
- this._graphID = _;
41
- return this;
42
- }
43
-
44
- sourceVertex(): Widget;
45
- sourceVertex(_: Widget): this;
46
- sourceVertex(_?: Widget): Widget | this {
47
- if (!arguments.length) return this._sourceVertex;
48
- this._sourceVertex = _;
49
- return this;
50
- }
51
-
52
- targetVertex(): Widget;
53
- targetVertex(_: Widget): this;
54
- targetVertex(_?: Widget): Widget | this {
55
- if (!arguments.length) return this._targetVertex;
56
- this._targetVertex = _;
57
- return this;
58
- }
59
-
60
- weight(): number;
61
- weight(_: number): this;
62
- weight(_?: number): number | this {
63
- if (!arguments.length) return this._weight;
64
- this._weight = _;
65
- return this;
66
- }
67
-
68
- points(): any[];
69
- points(_: any[], transitionDuration?, skipPushMarkers?): this;
70
- points(_?: any[], transitionDuration?, skipPushMarkers?): any[] | this {
71
- if (!arguments.length) return this._points;
72
- this._points = _;
73
- if (this._elementPath) {
74
- this.update(null, this._element, transitionDuration, skipPushMarkers);
75
- }
76
- return this;
77
- }
78
-
79
- hidden(_) {
80
- if (!arguments.length) return this._hidden;
81
- this._hidden = _;
82
- return this;
83
- }
84
-
85
- text(): string;
86
- text(_: string): this;
87
- text(_?: string): string | this {
88
- if (!arguments.length) return this._textBox.text();
89
- this._textBox.text(_);
90
- return this;
91
- }
92
-
93
- enter(domNode, element) {
94
- super.enter(domNode, element);
95
- this._elementPath = element.append("path");
96
-
97
- if (this._textBox.text()) {
98
- this._textBox
99
- .target(domNode)
100
- .tooltip(this.tooltip())
101
- .render()
102
- ;
103
- }
104
- }
105
-
106
- update(domNode, element, transitionDuration?, skipPushMarkers?) {
107
- super.update(domNode, element);
108
-
109
- const context = this;
110
- if (Platform.svgMarkerGlitch && !skipPushMarkers) {
111
- element.transition().duration((transitionDuration ? transitionDuration : 0) + 100)
112
- .on("start", function () {
113
- context._pushMarkers(element);
114
- })
115
- .on("end", function () {
116
- context._popMarkers(element);
117
- })
118
- ;
119
- }
120
- const points = context._calculateEdgePoints(this._sourceVertex, this._targetVertex, this._points);
121
- const svgPoints = element.selectAll(".point2").data(this.showControlPoints() ? points : []);
122
- svgPoints.enter().append("circle")
123
- .attr("class", "point2")
124
- .style("stroke", "red")
125
- .merge(svgPoints)
126
- .attr("cx", d => d.x)
127
- .attr("cy", d => d.y)
128
- .attr("r", 1)
129
- ;
130
- svgPoints.exit().remove();
131
-
132
- const line = d3Line()
133
- .x(function (d: any) { return d.x; })
134
- .y(function (d: any) { return d.y; })
135
- // .tension(0.75)
136
- .curve(Curve.basis)(points)
137
- ;
138
- let pathElements = this._elementPath;
139
- if (transitionDuration) {
140
- pathElements = pathElements.transition().duration(transitionDuration);
141
- }
142
- pathElements
143
- .attr("opacity", this._hidden ? 0 : 1)
144
- .attr("marker-start", !(Platform.svgMarkerGlitch && skipPushMarkers) && this.sourceMarker_exists() ? "url(#" + this._graphID + "_" + this.sourceMarker() + "Foot)" : null)
145
- .attr("marker-end", !(Platform.svgMarkerGlitch && skipPushMarkers) && this.targetMarker_exists() ? "url(#" + this._graphID + "_" + this.targetMarker() + "Head)" : null)
146
- .attr("stroke", this.strokeColor_exists() ? this.strokeColor() : null)
147
- .attr("stroke-dasharray", this.strokeDasharray_exists() ? this.strokeDasharray() : null)
148
- .attr("d", line)
149
- ;
150
-
151
- if (this._textBox.text()) {
152
- this._textBox
153
- .tooltip(this.tooltip())
154
- .move(this._findMidPoint(points), transitionDuration)
155
- ;
156
- }
157
- }
158
-
159
- exit(domNode, element) {
160
- if (this._textBox) {
161
- this._textBox.target(null);
162
- }
163
- super.exit(domNode, element);
164
- }
165
-
166
- _findMidPoint(points) {
167
- const midIdx = points.length / 2;
168
- if (points.length % 2) {
169
- return points[Math.floor(midIdx)];
170
- } else if (points.length) {
171
- const p0 = points[midIdx - 1];
172
- const p1 = points[midIdx];
173
- return { x: (p0.x + p1.x) / 2, y: (p0.y + p1.y) / 2 };
174
- }
175
- return { x: 0, y: 0 };
176
- }
177
-
178
- _calculateEdgePoints(source, target, _points) {
179
- if (!source || !target) {
180
- return [{ x: 0, y: 0 }, { x: 0, y: 0 }];
181
- }
182
- let points = _points ? _points.filter(p => !source.contains(p) && !target.contains(p)) : [];
183
- const p0 = points.length === 0 ? target.pos() : points[0];
184
- const p1 = points.length === 0 ? source.pos() : points[points.length - 1];
185
-
186
- points.unshift(source.intersection(source._pos, p0));
187
- points.push(target.intersection(target._pos, p1));
188
- if (!points[0]) {
189
- points[0] = source._pos;
190
- }
191
- if (!points[points.length - 1]) {
192
- points[points.length - 1] = target._pos;
193
- }
194
-
195
- if ((!_points || _points.length === 0) && points.length === 2 && points[0] && points[1]) {
196
- const dx = points[0].x - points[1].x;
197
- const dy = points[0].y - points[1].y;
198
- const dist = Math.sqrt(dx * dx + dy * dy);
199
- if (dist) {
200
- if (this.showArc()) {
201
- const midX = (points[0].x + points[1].x) / 2 - dy * this.arcDepth() / 100;
202
- const midY = (points[0].y + points[1].y) / 2 + dx * this.arcDepth() / 100;
203
- points = [{ x: points[0].x, y: points[0].y }, { x: midX, y: midY }, { x: points[1].x, y: points[1].y }];
204
- } else {
205
- points = [{ x: points[0].x, y: points[0].y }, { x: points[1].x, y: points[1].y }];
206
- }
207
- }
208
- }
209
- return points;
210
- }
211
- }
212
- Edge.prototype._class += " graph_Edge";
213
-
214
- export interface Edge {
215
- arcDepth(): number;
216
- arcDepth(_: number): this;
217
- showControlPoints(): boolean;
218
- showControlPoints(_: boolean): this;
219
- showArc(): boolean;
220
- showArc(_: boolean): this;
221
- tooltip(): string;
222
- tooltip(_: string): this;
223
-
224
- sourceMarker(): string;
225
- sourceMarker(_: string): this;
226
- sourceMarker_exists: () => boolean;
227
- targetMarker(): string;
228
- targetMarker(_: string): this;
229
- targetMarker_exists: () => boolean;
230
- strokeDasharray(): string;
231
- strokeDasharray(_: string): this;
232
- strokeDasharray_exists: () => boolean;
233
- strokeColor(): string;
234
- strokeColor(_: string): this;
235
- strokeColor_exists: () => boolean;
236
-
237
- text_shape_colorFill(): string;
238
- text_shape_colorFill(_: string): this;
239
- text_shape_colorStroke(): string;
240
- text_shape_colorStroke(_: string): this;
241
- text_text_colorFill(): string;
242
- text_text_colorFill(_: string): this;
243
- }
244
-
245
- Edge.prototype.publish("arcDepth", 16, "number", "Arc Depth", null, { tags: ["Basic"] });
246
- Edge.prototype.publish("showControlPoints", false, "boolean", "Show/Hide Control Points", null, { tags: ["Basic"] });
247
- Edge.prototype.publish("showArc", true, "boolean", "Show/Hide Arc", null, { tags: ["Basic"] });
248
- Edge.prototype.publish("tooltip", "", "string", "Tooltip", null, { tags: ["Private"] });
249
-
250
- Edge.prototype.publish("sourceMarker", "circle", "set", "Source Marker", ["none", "circle"], { optional: true });
251
- Edge.prototype.publish("targetMarker", "arrow", "set", "Source Marker", ["none", "arrow", "circle"], { optional: true });
252
- Edge.prototype.publish("strokeDasharray", null, "string", "Stroke Dash Array", null, { optional: true });
253
- Edge.prototype.publish("strokeColor", null, "html-color", "Stroke Color", null, { optional: true });
254
- Edge.prototype.publish("textColor", null, "html-color", "Text Color", null, { optional: true });
255
- Edge.prototype.publishProxy("text_shape_colorFill", "_textBox", "shape_colorFill");
256
- Edge.prototype.publishProxy("text_shape_colorStroke", "_textBox", "shape_colorStroke");
257
- Edge.prototype.publishProxy("text_text_colorFill", "_textBox", "text_colorFill");
1
+ import { Platform, SVGWidget, TextBox, Widget } from "@hpcc-js/common";
2
+ import { curveBasis as d3CurveBasis, curveBundle as d3CurveBundle, curveCardinal as d3CurveCardinal, curveCatmullRom as d3CurveCatmullRom, curveLinear as d3CurveLinear, line as d3Line } from "d3-shape";
3
+
4
+ import "./Edge.css";
5
+
6
+ const Curve = {
7
+ basis: d3CurveBasis,
8
+ bundle: d3CurveBundle,
9
+ cardinal: d3CurveCardinal,
10
+ catmullRom: d3CurveCatmullRom,
11
+ linear: d3CurveLinear
12
+ };
13
+
14
+ export class Edge extends SVGWidget {
15
+ protected _points: any[];
16
+ protected _weight: number;
17
+ protected _strokeDasharray: number[];
18
+ protected _hidden: boolean;
19
+ protected _textBox: TextBox;
20
+ protected _sourceVertex: Widget;
21
+ protected _targetVertex: Widget;
22
+ protected _elementPath;
23
+ protected _graphID;
24
+
25
+ constructor() {
26
+ super();
27
+
28
+ this._points = [];
29
+ this._weight = 100;
30
+ this._strokeDasharray = null;
31
+ this._hidden = false;
32
+
33
+ this._textBox = new TextBox()
34
+ .padding(0)
35
+ ;
36
+ }
37
+
38
+ graphID(_) {
39
+ if (!arguments.length) return this._graphID;
40
+ this._graphID = _;
41
+ return this;
42
+ }
43
+
44
+ sourceVertex(): Widget;
45
+ sourceVertex(_: Widget): this;
46
+ sourceVertex(_?: Widget): Widget | this {
47
+ if (!arguments.length) return this._sourceVertex;
48
+ this._sourceVertex = _;
49
+ return this;
50
+ }
51
+
52
+ targetVertex(): Widget;
53
+ targetVertex(_: Widget): this;
54
+ targetVertex(_?: Widget): Widget | this {
55
+ if (!arguments.length) return this._targetVertex;
56
+ this._targetVertex = _;
57
+ return this;
58
+ }
59
+
60
+ weight(): number;
61
+ weight(_: number): this;
62
+ weight(_?: number): number | this {
63
+ if (!arguments.length) return this._weight;
64
+ this._weight = _;
65
+ return this;
66
+ }
67
+
68
+ points(): any[];
69
+ points(_: any[], transitionDuration?, skipPushMarkers?): this;
70
+ points(_?: any[], transitionDuration?, skipPushMarkers?): any[] | this {
71
+ if (!arguments.length) return this._points;
72
+ this._points = _;
73
+ if (this._elementPath) {
74
+ this.update(null, this._element, transitionDuration, skipPushMarkers);
75
+ }
76
+ return this;
77
+ }
78
+
79
+ hidden(_) {
80
+ if (!arguments.length) return this._hidden;
81
+ this._hidden = _;
82
+ return this;
83
+ }
84
+
85
+ text(): string;
86
+ text(_: string): this;
87
+ text(_?: string): string | this {
88
+ if (!arguments.length) return this._textBox.text();
89
+ this._textBox.text(_);
90
+ return this;
91
+ }
92
+
93
+ enter(domNode, element) {
94
+ super.enter(domNode, element);
95
+ this._elementPath = element.append("path");
96
+
97
+ if (this._textBox.text()) {
98
+ this._textBox
99
+ .target(domNode)
100
+ .tooltip(this.tooltip())
101
+ .render()
102
+ ;
103
+ }
104
+ }
105
+
106
+ update(domNode, element, transitionDuration?, skipPushMarkers?) {
107
+ super.update(domNode, element);
108
+
109
+ const context = this;
110
+ if (Platform.svgMarkerGlitch && !skipPushMarkers) {
111
+ element.transition().duration((transitionDuration ? transitionDuration : 0) + 100)
112
+ .on("start", function () {
113
+ context._pushMarkers(element);
114
+ })
115
+ .on("end", function () {
116
+ context._popMarkers(element);
117
+ })
118
+ ;
119
+ }
120
+ const points = context._calculateEdgePoints(this._sourceVertex, this._targetVertex, this._points);
121
+ const svgPoints = element.selectAll(".point2").data(this.showControlPoints() ? points : []);
122
+ svgPoints.enter().append("circle")
123
+ .attr("class", "point2")
124
+ .style("stroke", "red")
125
+ .merge(svgPoints)
126
+ .attr("cx", d => d.x)
127
+ .attr("cy", d => d.y)
128
+ .attr("r", 1)
129
+ ;
130
+ svgPoints.exit().remove();
131
+
132
+ const line = d3Line()
133
+ .x(function (d: any) { return d.x; })
134
+ .y(function (d: any) { return d.y; })
135
+ // .tension(0.75)
136
+ .curve(Curve.basis)(points)
137
+ ;
138
+ let pathElements = this._elementPath;
139
+ if (transitionDuration) {
140
+ pathElements = pathElements.transition().duration(transitionDuration);
141
+ }
142
+ pathElements
143
+ .attr("opacity", this._hidden ? 0 : 1)
144
+ .attr("marker-start", !(Platform.svgMarkerGlitch && skipPushMarkers) && this.sourceMarker_exists() ? "url(#" + this._graphID + "_" + this.sourceMarker() + "Foot)" : null)
145
+ .attr("marker-end", !(Platform.svgMarkerGlitch && skipPushMarkers) && this.targetMarker_exists() ? "url(#" + this._graphID + "_" + this.targetMarker() + "Head)" : null)
146
+ .attr("stroke", this.strokeColor_exists() ? this.strokeColor() : null)
147
+ .attr("stroke-dasharray", this.strokeDasharray_exists() ? this.strokeDasharray() : null)
148
+ .attr("d", line)
149
+ ;
150
+
151
+ if (this._textBox.text()) {
152
+ this._textBox
153
+ .tooltip(this.tooltip())
154
+ .move(this._findMidPoint(points), transitionDuration)
155
+ ;
156
+ }
157
+ }
158
+
159
+ exit(domNode, element) {
160
+ if (this._textBox) {
161
+ this._textBox.target(null);
162
+ }
163
+ super.exit(domNode, element);
164
+ }
165
+
166
+ _findMidPoint(points) {
167
+ const midIdx = points.length / 2;
168
+ if (points.length % 2) {
169
+ return points[Math.floor(midIdx)];
170
+ } else if (points.length) {
171
+ const p0 = points[midIdx - 1];
172
+ const p1 = points[midIdx];
173
+ return { x: (p0.x + p1.x) / 2, y: (p0.y + p1.y) / 2 };
174
+ }
175
+ return { x: 0, y: 0 };
176
+ }
177
+
178
+ _calculateEdgePoints(source, target, _points) {
179
+ if (!source || !target) {
180
+ return [{ x: 0, y: 0 }, { x: 0, y: 0 }];
181
+ }
182
+ let points = _points ? _points.filter(p => !source.contains(p) && !target.contains(p)) : [];
183
+ const p0 = points.length === 0 ? target.pos() : points[0];
184
+ const p1 = points.length === 0 ? source.pos() : points[points.length - 1];
185
+
186
+ points.unshift(source.intersection(source._pos, p0));
187
+ points.push(target.intersection(target._pos, p1));
188
+ if (!points[0]) {
189
+ points[0] = source._pos;
190
+ }
191
+ if (!points[points.length - 1]) {
192
+ points[points.length - 1] = target._pos;
193
+ }
194
+
195
+ if ((!_points || _points.length === 0) && points.length === 2 && points[0] && points[1]) {
196
+ const dx = points[0].x - points[1].x;
197
+ const dy = points[0].y - points[1].y;
198
+ const dist = Math.sqrt(dx * dx + dy * dy);
199
+ if (dist) {
200
+ if (this.showArc()) {
201
+ const midX = (points[0].x + points[1].x) / 2 - dy * this.arcDepth() / 100;
202
+ const midY = (points[0].y + points[1].y) / 2 + dx * this.arcDepth() / 100;
203
+ points = [{ x: points[0].x, y: points[0].y }, { x: midX, y: midY }, { x: points[1].x, y: points[1].y }];
204
+ } else {
205
+ points = [{ x: points[0].x, y: points[0].y }, { x: points[1].x, y: points[1].y }];
206
+ }
207
+ }
208
+ }
209
+ return points;
210
+ }
211
+ }
212
+ Edge.prototype._class += " graph_Edge";
213
+
214
+ export interface Edge {
215
+ arcDepth(): number;
216
+ arcDepth(_: number): this;
217
+ showControlPoints(): boolean;
218
+ showControlPoints(_: boolean): this;
219
+ showArc(): boolean;
220
+ showArc(_: boolean): this;
221
+ tooltip(): string;
222
+ tooltip(_: string): this;
223
+
224
+ sourceMarker(): string;
225
+ sourceMarker(_: string): this;
226
+ sourceMarker_exists: () => boolean;
227
+ targetMarker(): string;
228
+ targetMarker(_: string): this;
229
+ targetMarker_exists: () => boolean;
230
+ strokeDasharray(): string;
231
+ strokeDasharray(_: string): this;
232
+ strokeDasharray_exists: () => boolean;
233
+ strokeColor(): string;
234
+ strokeColor(_: string): this;
235
+ strokeColor_exists: () => boolean;
236
+
237
+ text_shape_colorFill(): string;
238
+ text_shape_colorFill(_: string): this;
239
+ text_shape_colorStroke(): string;
240
+ text_shape_colorStroke(_: string): this;
241
+ text_text_colorFill(): string;
242
+ text_text_colorFill(_: string): this;
243
+ }
244
+
245
+ Edge.prototype.publish("arcDepth", 16, "number", "Arc Depth", null, { tags: ["Basic"] });
246
+ Edge.prototype.publish("showControlPoints", false, "boolean", "Show/Hide Control Points", null, { tags: ["Basic"] });
247
+ Edge.prototype.publish("showArc", true, "boolean", "Show/Hide Arc", null, { tags: ["Basic"] });
248
+ Edge.prototype.publish("tooltip", "", "string", "Tooltip", null, { tags: ["Private"] });
249
+
250
+ Edge.prototype.publish("sourceMarker", "circle", "set", "Source Marker", ["none", "circle"], { optional: true });
251
+ Edge.prototype.publish("targetMarker", "arrow", "set", "Source Marker", ["none", "arrow", "circle"], { optional: true });
252
+ Edge.prototype.publish("strokeDasharray", null, "string", "Stroke Dash Array", null, { optional: true });
253
+ Edge.prototype.publish("strokeColor", null, "html-color", "Stroke Color", null, { optional: true });
254
+ Edge.prototype.publish("textColor", null, "html-color", "Text Color", null, { optional: true });
255
+ Edge.prototype.publishProxy("text_shape_colorFill", "_textBox", "shape_colorFill");
256
+ Edge.prototype.publishProxy("text_shape_colorStroke", "_textBox", "shape_colorStroke");
257
+ Edge.prototype.publishProxy("text_text_colorFill", "_textBox", "text_colorFill");
package/src/Graph.css CHANGED
@@ -1,19 +1,19 @@
1
- .graph_Graph .marker {
2
- fill: #656565;
3
- stroke: none;
4
- stroke-width: 1.0px;
5
- }
6
-
7
- .graph_Graph .zoom {
8
- fill: none;
9
- pointer-events: all;
10
- }
11
-
12
- .graph_Graph .selectionBrush {
13
- fill: none;
14
- stroke: darkgray;
15
- }
16
-
17
- .graph_Graph .graphEdge.shortest-path .graph_Edge {
18
- stroke: red;
1
+ .graph_Graph .marker {
2
+ fill: #656565;
3
+ stroke: none;
4
+ stroke-width: 1.0px;
5
+ }
6
+
7
+ .graph_Graph .zoom {
8
+ fill: none;
9
+ pointer-events: all;
10
+ }
11
+
12
+ .graph_Graph .selectionBrush {
13
+ fill: none;
14
+ stroke: darkgray;
15
+ }
16
+
17
+ .graph_Graph .graphEdge.shortest-path .graph_Edge {
18
+ stroke: red;
19
19
  }