@hpcc-js/common 3.7.5 → 3.7.6
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.
- package/LICENSE +43 -43
- package/README.md +59 -59
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +3 -3
- package/src/CanvasWidget.ts +31 -31
- package/src/Class.ts +72 -72
- package/src/Database.ts +860 -860
- package/src/Entity.ts +235 -235
- package/src/EntityCard.ts +66 -66
- package/src/EntityPin.ts +103 -103
- package/src/EntityRect.css +15 -15
- package/src/EntityRect.ts +254 -254
- package/src/EntityVertex.ts +86 -86
- package/src/FAChar.css +2 -2
- package/src/FAChar.ts +89 -89
- package/src/HTMLWidget.ts +191 -191
- package/src/IList.ts +4 -4
- package/src/IMenu.ts +5 -5
- package/src/Icon.css +9 -9
- package/src/Icon.ts +176 -176
- package/src/Image.ts +104 -104
- package/src/List.css +12 -12
- package/src/List.ts +102 -102
- package/src/Menu.css +22 -22
- package/src/Menu.ts +139 -139
- package/src/Palette.ts +341 -341
- package/src/Platform.ts +125 -125
- package/src/ProgressBar.ts +115 -115
- package/src/PropertyExt.ts +770 -770
- package/src/ResizeSurface.css +38 -38
- package/src/ResizeSurface.ts +225 -225
- package/src/SVGWidget.ts +583 -583
- package/src/SVGZoomWidget.css +11 -11
- package/src/SVGZoomWidget.ts +427 -427
- package/src/Shape.css +3 -3
- package/src/Shape.ts +186 -186
- package/src/Surface.css +39 -39
- package/src/Surface.ts +364 -364
- package/src/Text.css +3 -3
- package/src/Text.ts +131 -131
- package/src/TextBox.css +3 -3
- package/src/TextBox.ts +183 -183
- package/src/TitleBar.css +114 -114
- package/src/TitleBar.ts +407 -407
- package/src/Transition.ts +45 -45
- package/src/Utility.ts +843 -843
- package/src/Widget.css +7 -7
- package/src/Widget.ts +731 -731
- package/src/WidgetArray.ts +15 -15
- package/src/__package__.ts +3 -3
- package/src/index.ts +55 -55
package/src/EntityVertex.ts
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
import { Entity } from "./Entity.ts";
|
|
2
|
-
import { TextBox } from "./TextBox.ts";
|
|
3
|
-
|
|
4
|
-
export class EntityVertex extends Entity {
|
|
5
|
-
protected _textbox_widget: TextBox;
|
|
6
|
-
protected _element_textbox;
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
this._textbox_widget = new TextBox();
|
|
10
|
-
}
|
|
11
|
-
enter(domNode, element) {
|
|
12
|
-
this._element_textbox = element.append("g").attr("class", "entity_textbox");
|
|
13
|
-
super.enter(domNode, element);
|
|
14
|
-
this._textbox_widget.target(this._element_textbox.node());
|
|
15
|
-
}
|
|
16
|
-
update() {
|
|
17
|
-
super.update.apply(this, arguments);
|
|
18
|
-
this._textbox_widget
|
|
19
|
-
.text(this._title_widget.text());
|
|
20
|
-
this._icon_widget
|
|
21
|
-
.shape_colorFill(this.iconColorFill())
|
|
22
|
-
.shape_colorStroke(this.iconColorStroke());
|
|
23
|
-
this._background_widget
|
|
24
|
-
.colorFill("none")
|
|
25
|
-
.colorStroke("none");
|
|
26
|
-
|
|
27
|
-
this._icon_widget.render();
|
|
28
|
-
this._textbox_widget.render();
|
|
29
|
-
const icon_bbox = this._icon_widget.getBBox(true);
|
|
30
|
-
const text_bbox = this._textbox_widget.getBBox(true);
|
|
31
|
-
let _icon_x = 0;
|
|
32
|
-
let _icon_y = -(text_bbox.height / 2) - (icon_bbox.height / 3);
|
|
33
|
-
switch (this.iconAnchor()) {
|
|
34
|
-
case "start":
|
|
35
|
-
_icon_x = -(text_bbox.width / 2) + (icon_bbox.width / 3);
|
|
36
|
-
break;
|
|
37
|
-
case "end":
|
|
38
|
-
_icon_x = (text_bbox.width / 2) - (icon_bbox.width / 3);
|
|
39
|
-
break;
|
|
40
|
-
case "left":
|
|
41
|
-
_icon_x = -(text_bbox.width / 2) - (icon_bbox.width / 2);
|
|
42
|
-
_icon_y = 0;
|
|
43
|
-
break;
|
|
44
|
-
}
|
|
45
|
-
this._icon_widget.move({
|
|
46
|
-
x: _icon_x,
|
|
47
|
-
y: _icon_y
|
|
48
|
-
});
|
|
49
|
-
this.moveAnnotations(text_bbox.width / 2, text_bbox.height / 2);
|
|
50
|
-
}
|
|
51
|
-
exit(domNode, element) {
|
|
52
|
-
this._textbox_widget.target(null);
|
|
53
|
-
super.exit(domNode, element);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
EntityVertex.prototype._class += " common_EntityVertex";
|
|
57
|
-
|
|
58
|
-
export interface EntityVertex {
|
|
59
|
-
iconAnchor(): string;
|
|
60
|
-
iconAnchor(_: string): this;
|
|
61
|
-
iconColorFill(): string;
|
|
62
|
-
iconColorFill(_: string): this;
|
|
63
|
-
iconColorStroke(): string;
|
|
64
|
-
iconColorStroke(_: string): this;
|
|
65
|
-
shape_colorStroke(): string;
|
|
66
|
-
shape_colorStroke(_: string): this;
|
|
67
|
-
shape_colorFill(): string;
|
|
68
|
-
shape_colorFill(_: string): this;
|
|
69
|
-
text_colorFill(): string;
|
|
70
|
-
text_colorFill(_: string): this;
|
|
71
|
-
|
|
72
|
-
textboxColorStroke(): string;
|
|
73
|
-
textboxColorStroke(_: string): this;
|
|
74
|
-
textboxColorFill(): string;
|
|
75
|
-
textboxColorFill(_: string): this;
|
|
76
|
-
textboxFontColor(): string;
|
|
77
|
-
textboxFontColor(_: string): this;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
EntityVertex.prototype.publish("iconAnchor", "start", "set", "Horizontal anchor position of icon", ["", "start", "middle", "end", "left"]);
|
|
81
|
-
EntityVertex.prototype.publish("iconColorFill", null, "html-color", "iconColorFill");
|
|
82
|
-
EntityVertex.prototype.publish("iconColorStroke", null, "html-color", "iconColorStroke");
|
|
83
|
-
|
|
84
|
-
EntityVertex.prototype.publishProxy("textboxColorStroke", "_textbox_widget", "shape_colorStroke");
|
|
85
|
-
EntityVertex.prototype.publishProxy("textboxColorFill", "_textbox_widget", "shape_colorFill");
|
|
86
|
-
EntityVertex.prototype.publishProxy("textboxFontColor", "_textbox_widget", "text_colorFill");
|
|
1
|
+
import { Entity } from "./Entity.ts";
|
|
2
|
+
import { TextBox } from "./TextBox.ts";
|
|
3
|
+
|
|
4
|
+
export class EntityVertex extends Entity {
|
|
5
|
+
protected _textbox_widget: TextBox;
|
|
6
|
+
protected _element_textbox;
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this._textbox_widget = new TextBox();
|
|
10
|
+
}
|
|
11
|
+
enter(domNode, element) {
|
|
12
|
+
this._element_textbox = element.append("g").attr("class", "entity_textbox");
|
|
13
|
+
super.enter(domNode, element);
|
|
14
|
+
this._textbox_widget.target(this._element_textbox.node());
|
|
15
|
+
}
|
|
16
|
+
update() {
|
|
17
|
+
super.update.apply(this, arguments);
|
|
18
|
+
this._textbox_widget
|
|
19
|
+
.text(this._title_widget.text());
|
|
20
|
+
this._icon_widget
|
|
21
|
+
.shape_colorFill(this.iconColorFill())
|
|
22
|
+
.shape_colorStroke(this.iconColorStroke());
|
|
23
|
+
this._background_widget
|
|
24
|
+
.colorFill("none")
|
|
25
|
+
.colorStroke("none");
|
|
26
|
+
|
|
27
|
+
this._icon_widget.render();
|
|
28
|
+
this._textbox_widget.render();
|
|
29
|
+
const icon_bbox = this._icon_widget.getBBox(true);
|
|
30
|
+
const text_bbox = this._textbox_widget.getBBox(true);
|
|
31
|
+
let _icon_x = 0;
|
|
32
|
+
let _icon_y = -(text_bbox.height / 2) - (icon_bbox.height / 3);
|
|
33
|
+
switch (this.iconAnchor()) {
|
|
34
|
+
case "start":
|
|
35
|
+
_icon_x = -(text_bbox.width / 2) + (icon_bbox.width / 3);
|
|
36
|
+
break;
|
|
37
|
+
case "end":
|
|
38
|
+
_icon_x = (text_bbox.width / 2) - (icon_bbox.width / 3);
|
|
39
|
+
break;
|
|
40
|
+
case "left":
|
|
41
|
+
_icon_x = -(text_bbox.width / 2) - (icon_bbox.width / 2);
|
|
42
|
+
_icon_y = 0;
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
this._icon_widget.move({
|
|
46
|
+
x: _icon_x,
|
|
47
|
+
y: _icon_y
|
|
48
|
+
});
|
|
49
|
+
this.moveAnnotations(text_bbox.width / 2, text_bbox.height / 2);
|
|
50
|
+
}
|
|
51
|
+
exit(domNode, element) {
|
|
52
|
+
this._textbox_widget.target(null);
|
|
53
|
+
super.exit(domNode, element);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
EntityVertex.prototype._class += " common_EntityVertex";
|
|
57
|
+
|
|
58
|
+
export interface EntityVertex {
|
|
59
|
+
iconAnchor(): string;
|
|
60
|
+
iconAnchor(_: string): this;
|
|
61
|
+
iconColorFill(): string;
|
|
62
|
+
iconColorFill(_: string): this;
|
|
63
|
+
iconColorStroke(): string;
|
|
64
|
+
iconColorStroke(_: string): this;
|
|
65
|
+
shape_colorStroke(): string;
|
|
66
|
+
shape_colorStroke(_: string): this;
|
|
67
|
+
shape_colorFill(): string;
|
|
68
|
+
shape_colorFill(_: string): this;
|
|
69
|
+
text_colorFill(): string;
|
|
70
|
+
text_colorFill(_: string): this;
|
|
71
|
+
|
|
72
|
+
textboxColorStroke(): string;
|
|
73
|
+
textboxColorStroke(_: string): this;
|
|
74
|
+
textboxColorFill(): string;
|
|
75
|
+
textboxColorFill(_: string): this;
|
|
76
|
+
textboxFontColor(): string;
|
|
77
|
+
textboxFontColor(_: string): this;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
EntityVertex.prototype.publish("iconAnchor", "start", "set", "Horizontal anchor position of icon", ["", "start", "middle", "end", "left"]);
|
|
81
|
+
EntityVertex.prototype.publish("iconColorFill", null, "html-color", "iconColorFill");
|
|
82
|
+
EntityVertex.prototype.publish("iconColorStroke", null, "html-color", "iconColorStroke");
|
|
83
|
+
|
|
84
|
+
EntityVertex.prototype.publishProxy("textboxColorStroke", "_textbox_widget", "shape_colorStroke");
|
|
85
|
+
EntityVertex.prototype.publishProxy("textboxColorFill", "_textbox_widget", "shape_colorFill");
|
|
86
|
+
EntityVertex.prototype.publishProxy("textboxFontColor", "_textbox_widget", "text_colorFill");
|
package/src/FAChar.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
.common_FAChar .common_Text {
|
|
2
|
-
font-size: 14px;
|
|
1
|
+
.common_FAChar .common_Text {
|
|
2
|
+
font-size: 14px;
|
|
3
3
|
}
|