plotboilerplate 1.12.7 → 1.13.0
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/README.md +4 -1
- package/changelog.md +25 -0
- package/dist/index.esm.js +259 -44
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/dist/plotboilerplate.browser.min.js +1 -1
- package/dist/plotboilerplate.browser.min.js.map +1 -1
- package/dist/plotboilerplate.js +273 -43
- package/dist/plotboilerplate.min.js +1 -1
- package/package.json +1 -1
- package/src/cjs/PBText.d.ts +116 -0
- package/src/cjs/PBText.js +66 -0
- package/src/cjs/PBText.js.map +1 -0
- package/src/cjs/PlotBoilerplate.d.ts +2 -1
- package/src/cjs/PlotBoilerplate.js +66 -19
- package/src/cjs/PlotBoilerplate.js.map +1 -1
- package/src/cjs/draw.d.ts +30 -2
- package/src/cjs/draw.js +51 -6
- package/src/cjs/draw.js.map +1 -1
- package/src/cjs/drawgl.d.ts +29 -2
- package/src/cjs/drawgl.js +21 -4
- package/src/cjs/drawgl.js.map +1 -1
- package/src/cjs/drawutilssvg.d.ts +25 -7
- package/src/cjs/drawutilssvg.js +62 -14
- package/src/cjs/drawutilssvg.js.map +1 -1
- package/src/cjs/entry.js +1 -0
- package/src/cjs/index.d.ts +1 -0
- package/src/cjs/index.js +1 -0
- package/src/cjs/index.js.map +1 -1
- package/src/cjs/interfaces/DrawLib.d.ts +27 -6
- package/src/cjs/interfaces/DrawLib.js +3 -0
- package/src/cjs/interfaces/DrawLib.js.map +1 -1
- package/src/cjs/interfaces/core.d.ts +12 -1
- package/src/cjs/interfaces/core.js +1 -0
- package/src/cjs/interfaces/core.js.map +1 -1
- package/src/cjs/utils/datastructures/Color.d.ts +28 -15
- package/src/cjs/utils/datastructures/Color.js +276 -88
- package/src/cjs/utils/datastructures/Color.js.map +1 -1
- package/src/esm/PBText.d.ts +116 -0
- package/src/esm/PBText.js +61 -0
- package/src/esm/PBText.js.map +1 -0
- package/src/esm/PlotBoilerplate.d.ts +2 -1
- package/src/esm/PlotBoilerplate.js +66 -19
- package/src/esm/PlotBoilerplate.js.map +1 -1
- package/src/esm/draw.d.ts +30 -2
- package/src/esm/draw.js +51 -6
- package/src/esm/draw.js.map +1 -1
- package/src/esm/drawgl.d.ts +29 -2
- package/src/esm/drawgl.js +21 -4
- package/src/esm/drawgl.js.map +1 -1
- package/src/esm/drawutilssvg.d.ts +25 -7
- package/src/esm/drawutilssvg.js +62 -14
- package/src/esm/drawutilssvg.js.map +1 -1
- package/src/esm/entry.js +1 -0
- package/src/esm/index.d.ts +1 -0
- package/src/esm/index.js +1 -0
- package/src/esm/index.js.map +1 -1
- package/src/esm/interfaces/DrawLib.d.ts +27 -6
- package/src/esm/interfaces/DrawLib.js +3 -0
- package/src/esm/interfaces/DrawLib.js.map +1 -1
- package/src/esm/interfaces/core.d.ts +12 -1
- package/src/esm/interfaces/core.js +1 -0
- package/src/esm/interfaces/core.js.map +1 -1
- package/src/esm/utils/datastructures/Color.d.ts +28 -15
- package/src/esm/utils/datastructures/Color.js +277 -89
- package/src/esm/utils/datastructures/Color.js.map +1 -1
- package/src/ts/PBText.ts +147 -0
- package/src/ts/PlotBoilerplate.ts +74 -23
- package/src/ts/draw.ts +71 -8
- package/src/ts/drawgl.ts +48 -8
- package/src/ts/drawutilssvg.ts +94 -17
- package/src/ts/index.ts +1 -0
- package/src/ts/interfaces/DrawLib.ts +30 -4
- package/src/ts/interfaces/core.ts +12 -0
- package/src/ts/utils/datastructures/Color.ts +695 -508
- package/src/ts/utils/algorithms/clearPolygonDuplicateVertices.ts~ +0 -5
- package/src/ts/utils/algorithms/findPolygonSelfIntersections.ts~ +0 -45
- package/src/ts/utils/algorithms/splitPolygonToNonIntersecting.ts~ +0 -113
- package/src/ts/utils/algorithms/sutherlandHodgman.ts~ +0 -88
- package/src/ts/utils/datastructures/Color.ts~ +0 -331
- package/src/ts/utils/datastructures/Girih.ts~ +0 -151
- package/src/ts/utils/datastructures/GirihTile.ts~ +0 -419
package/package.json
CHANGED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Ikaros Kappler
|
|
3
|
+
* @date 2021-11-16
|
|
4
|
+
* @version 1.0.0
|
|
5
|
+
**/
|
|
6
|
+
import { Vertex } from "./Vertex";
|
|
7
|
+
import { FontOptions, FontStyle, FontWeight, SVGSerializable, UID } from "./interfaces";
|
|
8
|
+
/**
|
|
9
|
+
* @classdesc A simple text element: position, fontSize, fontFamily, color, textAlign, lineHeight and rotation.
|
|
10
|
+
*
|
|
11
|
+
* @requires FontOptions
|
|
12
|
+
* @requires FontSize
|
|
13
|
+
* @requires FontStyle
|
|
14
|
+
* @requires FontWeight
|
|
15
|
+
* @requires Vertex
|
|
16
|
+
* @requires SVGSerializale
|
|
17
|
+
* @requires UID
|
|
18
|
+
* @requires UIDGenerator
|
|
19
|
+
**/
|
|
20
|
+
export declare class PBText implements SVGSerializable, FontOptions {
|
|
21
|
+
/**
|
|
22
|
+
* Required to generate proper CSS classes and other class related IDs.
|
|
23
|
+
**/
|
|
24
|
+
readonly className: string;
|
|
25
|
+
/**
|
|
26
|
+
* The UID of this drawable object.
|
|
27
|
+
*
|
|
28
|
+
* @member {UID}
|
|
29
|
+
* @memberof PBText
|
|
30
|
+
* @instance
|
|
31
|
+
* @readonly
|
|
32
|
+
*/
|
|
33
|
+
readonly uid: UID;
|
|
34
|
+
/**
|
|
35
|
+
* @member {string}
|
|
36
|
+
* @memberof PBText
|
|
37
|
+
* @instance
|
|
38
|
+
*/
|
|
39
|
+
text: string;
|
|
40
|
+
/**
|
|
41
|
+
* @member {Vertex}
|
|
42
|
+
* @memberof PBText
|
|
43
|
+
* @instance
|
|
44
|
+
*/
|
|
45
|
+
anchor: Vertex;
|
|
46
|
+
/**
|
|
47
|
+
* @member {number}
|
|
48
|
+
* @memberof PBText
|
|
49
|
+
* @instance
|
|
50
|
+
*/
|
|
51
|
+
fontSize: number | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* @member {number}
|
|
54
|
+
* @memberof PBText
|
|
55
|
+
* @instance
|
|
56
|
+
*/
|
|
57
|
+
lineHeight: number | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* @member {FontWeight}
|
|
60
|
+
* @memberof PBText
|
|
61
|
+
* @instance
|
|
62
|
+
*/
|
|
63
|
+
fontWeight: FontWeight | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* @member {FontStyle}
|
|
66
|
+
* @memberof PBText
|
|
67
|
+
* @instance
|
|
68
|
+
*/
|
|
69
|
+
fontStyle: FontStyle | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* @member {CanvasRenderingContext2D["textAlign"]}
|
|
72
|
+
* @memberof PBText
|
|
73
|
+
* @instance
|
|
74
|
+
*/
|
|
75
|
+
textAlign: CanvasRenderingContext2D["textAlign"] | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* @member {number}
|
|
78
|
+
* @memberof PBText
|
|
79
|
+
* @instance
|
|
80
|
+
*/
|
|
81
|
+
rotation: number | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* @member {number}
|
|
84
|
+
* @memberof PBText
|
|
85
|
+
* @instance
|
|
86
|
+
*/
|
|
87
|
+
fontFamily: string | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* @member {number}
|
|
90
|
+
* @memberof PBText
|
|
91
|
+
* @instance
|
|
92
|
+
*/
|
|
93
|
+
color: string | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Create a new circle with given center point and radius.
|
|
96
|
+
*
|
|
97
|
+
* @constructor
|
|
98
|
+
* @name Circle
|
|
99
|
+
* @param {Vertex} center - The center point of the circle.
|
|
100
|
+
* @param {number} radius - The radius of the circle.
|
|
101
|
+
*/
|
|
102
|
+
constructor(text: string, anchor?: Vertex, options?: FontOptions);
|
|
103
|
+
/**
|
|
104
|
+
* Create an SVG representation of this circle.
|
|
105
|
+
*
|
|
106
|
+
* @deprecated DEPRECATION Please use the drawutilssvg library and an XMLSerializer instead.
|
|
107
|
+
* @method toSVGString
|
|
108
|
+
* @param {object=} options - An optional set of options, like 'className'.
|
|
109
|
+
* @return {string} A string representing the SVG code for this vertex.
|
|
110
|
+
* @instance
|
|
111
|
+
* @memberof Circle
|
|
112
|
+
*/
|
|
113
|
+
toSVGString(options: {
|
|
114
|
+
className?: string;
|
|
115
|
+
}): string;
|
|
116
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author Ikaros Kappler
|
|
4
|
+
* @date 2021-11-16
|
|
5
|
+
* @version 1.0.0
|
|
6
|
+
**/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.PBText = void 0;
|
|
9
|
+
var UIDGenerator_1 = require("./UIDGenerator");
|
|
10
|
+
var Vertex_1 = require("./Vertex");
|
|
11
|
+
/**
|
|
12
|
+
* @classdesc A simple text element: position, fontSize, fontFamily, color, textAlign, lineHeight and rotation.
|
|
13
|
+
*
|
|
14
|
+
* @requires FontOptions
|
|
15
|
+
* @requires FontSize
|
|
16
|
+
* @requires FontStyle
|
|
17
|
+
* @requires FontWeight
|
|
18
|
+
* @requires Vertex
|
|
19
|
+
* @requires SVGSerializale
|
|
20
|
+
* @requires UID
|
|
21
|
+
* @requires UIDGenerator
|
|
22
|
+
**/
|
|
23
|
+
var PBText = /** @class */ (function () {
|
|
24
|
+
/**
|
|
25
|
+
* Create a new circle with given center point and radius.
|
|
26
|
+
*
|
|
27
|
+
* @constructor
|
|
28
|
+
* @name Circle
|
|
29
|
+
* @param {Vertex} center - The center point of the circle.
|
|
30
|
+
* @param {number} radius - The radius of the circle.
|
|
31
|
+
*/
|
|
32
|
+
function PBText(text, anchor, options) {
|
|
33
|
+
/**
|
|
34
|
+
* Required to generate proper CSS classes and other class related IDs.
|
|
35
|
+
**/
|
|
36
|
+
this.className = "PBText";
|
|
37
|
+
this.uid = UIDGenerator_1.UIDGenerator.next();
|
|
38
|
+
this.text = text;
|
|
39
|
+
this.anchor = anchor !== null && anchor !== void 0 ? anchor : new Vertex_1.Vertex();
|
|
40
|
+
this.color = options.color;
|
|
41
|
+
this.fontFamily = options.fontFamily;
|
|
42
|
+
this.fontSize = options.fontSize;
|
|
43
|
+
this.fontStyle = options.fontStyle;
|
|
44
|
+
this.fontWeight = options.fontWeight;
|
|
45
|
+
this.lineHeight = options.lineHeight;
|
|
46
|
+
this.textAlign = options.textAlign;
|
|
47
|
+
this.rotation = options.rotation;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Create an SVG representation of this circle.
|
|
51
|
+
*
|
|
52
|
+
* @deprecated DEPRECATION Please use the drawutilssvg library and an XMLSerializer instead.
|
|
53
|
+
* @method toSVGString
|
|
54
|
+
* @param {object=} options - An optional set of options, like 'className'.
|
|
55
|
+
* @return {string} A string representing the SVG code for this vertex.
|
|
56
|
+
* @instance
|
|
57
|
+
* @memberof Circle
|
|
58
|
+
*/
|
|
59
|
+
PBText.prototype.toSVGString = function (options) {
|
|
60
|
+
console.warn("[PBText.toSVGString()] This function is not implemented as it defines a deprecated method. Use the 'drawutilssvg.text()' method instead.");
|
|
61
|
+
return "";
|
|
62
|
+
};
|
|
63
|
+
return PBText;
|
|
64
|
+
}()); // END class
|
|
65
|
+
exports.PBText = PBText;
|
|
66
|
+
//# sourceMappingURL=PBText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PBText.js","sourceRoot":"","sources":["../ts/PBText.ts"],"names":[],"mappings":";AAAA;;;;IAII;;;AAEJ,+CAA8C;AAC9C,mCAAkC;AAGlC;;;;;;;;;;;IAWI;AACJ;IAsFE;;;;;;;OAOG;IACH,gBAAY,IAAY,EAAE,MAAe,EAAE,OAAqB;QA7FhE;;YAEI;QACK,cAAS,GAAW,QAAQ,CAAC;QA2FpC,IAAI,CAAC,GAAG,GAAG,2BAAY,CAAC,IAAI,EAAE,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,IAAI,eAAM,EAAE,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IACnC,CAAC;IAED;;;;;;;;;OASG;IACH,4BAAW,GAAX,UAAY,OAA+B;QACzC,OAAO,CAAC,IAAI,CACV,0IAA0I,CAC3I,CAAC;QACF,OAAO,EAAE,CAAC;IACZ,CAAC;IACH,aAAC;AAAD,CAAC,AA5HD,IA4HC,CAAC,YAAY;AA5HD,wBAAM"}
|
|
@@ -73,7 +73,8 @@
|
|
|
73
73
|
* @modified 2021-03-03 Added the `VEllipseSector` drawable.
|
|
74
74
|
* @modified 2021-03-29 Clearing `currentClassName` and `currentId` after drawing each drawable.
|
|
75
75
|
* @modified 2021-04-25 Extending `remove` to accept arrays of drawables.
|
|
76
|
-
* @
|
|
76
|
+
* @modified 2021-11-16 Adding the `PBText` drawable.
|
|
77
|
+
* @version 1.15.0
|
|
77
78
|
*
|
|
78
79
|
* @file PlotBoilerplate
|
|
79
80
|
* @fileoverview The main class.
|
|
@@ -74,7 +74,8 @@
|
|
|
74
74
|
* @modified 2021-03-03 Added the `VEllipseSector` drawable.
|
|
75
75
|
* @modified 2021-03-29 Clearing `currentClassName` and `currentId` after drawing each drawable.
|
|
76
76
|
* @modified 2021-04-25 Extending `remove` to accept arrays of drawables.
|
|
77
|
-
* @
|
|
77
|
+
* @modified 2021-11-16 Adding the `PBText` drawable.
|
|
78
|
+
* @version 1.15.0
|
|
78
79
|
*
|
|
79
80
|
* @file PlotBoilerplate
|
|
80
81
|
* @fileoverview The main class.
|
|
@@ -102,6 +103,7 @@ var VEllipseSector_1 = require("./VEllipseSector");
|
|
|
102
103
|
var Vector_1 = require("./Vector");
|
|
103
104
|
var Vertex_1 = require("./Vertex");
|
|
104
105
|
var VertexAttr_1 = require("./VertexAttr");
|
|
106
|
+
var PBText_1 = require("./PBText");
|
|
105
107
|
/**
|
|
106
108
|
* @classdesc The main class of the PlotBoilerplate.
|
|
107
109
|
*
|
|
@@ -285,6 +287,16 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
285
287
|
handleLine: {
|
|
286
288
|
color: "rgba(180,180,180,0.5)",
|
|
287
289
|
lineWidth: 1
|
|
290
|
+
},
|
|
291
|
+
pathVertex: {
|
|
292
|
+
color: "#B400FF",
|
|
293
|
+
lineWidth: 1,
|
|
294
|
+
fill: true
|
|
295
|
+
},
|
|
296
|
+
controlVertex: {
|
|
297
|
+
color: "#B8D438",
|
|
298
|
+
lineWidth: 1,
|
|
299
|
+
fill: true
|
|
288
300
|
}
|
|
289
301
|
},
|
|
290
302
|
polygon: {
|
|
@@ -330,6 +342,12 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
330
342
|
image: {
|
|
331
343
|
color: "#a8a8a8",
|
|
332
344
|
lineWidth: 1
|
|
345
|
+
},
|
|
346
|
+
text: {
|
|
347
|
+
color: "rgba(192,0,128,0.5)",
|
|
348
|
+
lineWidth: 1,
|
|
349
|
+
fill: true,
|
|
350
|
+
anchor: true
|
|
333
351
|
}
|
|
334
352
|
}; // END drawConfig
|
|
335
353
|
// +---------------------------------------------------------------------------------
|
|
@@ -637,6 +655,11 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
637
655
|
});
|
|
638
656
|
drawable.lowerRight.attr.selectable = false;
|
|
639
657
|
}
|
|
658
|
+
else if (drawable instanceof PBText_1.PBText) {
|
|
659
|
+
this.vertices.push(drawable.anchor);
|
|
660
|
+
this.drawables.push(drawable);
|
|
661
|
+
drawable.anchor.attr.selectable = false;
|
|
662
|
+
}
|
|
640
663
|
else {
|
|
641
664
|
throw "Cannot add drawable of unrecognized type: " + typeof drawable + ".";
|
|
642
665
|
}
|
|
@@ -735,6 +758,9 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
735
758
|
this.removeVertex(drawable.upperLeft, false);
|
|
736
759
|
this.removeVertex(drawable.lowerRight, false);
|
|
737
760
|
}
|
|
761
|
+
else if (drawable instanceof PBText_1.PBText) {
|
|
762
|
+
this.removeVertex(drawable.anchor, false);
|
|
763
|
+
}
|
|
738
764
|
} // END removeWithVertices
|
|
739
765
|
if (redraw) {
|
|
740
766
|
this.redraw();
|
|
@@ -908,32 +934,43 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
908
934
|
for (var c in d.bezierCurves) {
|
|
909
935
|
draw.cubicBezier(d.bezierCurves[c].startPoint, d.bezierCurves[c].endPoint, d.bezierCurves[c].startControlPoint, d.bezierCurves[c].endControlPoint, this.drawConfig.bezier.color, this.drawConfig.bezier.lineWidth);
|
|
910
936
|
if (this.drawConfig.drawBezierHandlePoints && this.drawConfig.drawHandlePoints) {
|
|
911
|
-
if (
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
937
|
+
if (d.bezierCurves[c].startPoint.attr.visible) {
|
|
938
|
+
var df = this.drawConfig.bezier.pathVertex.fill ? fill : draw;
|
|
939
|
+
df.setCurrentId(d.uid + "_h0");
|
|
940
|
+
df.setCurrentClassName(d.className + "-start-handle");
|
|
941
|
+
if (d.bezierCurves[c].startPoint.attr.bezierAutoAdjust) {
|
|
942
|
+
df.squareHandle(d.bezierCurves[c].startPoint, 5, this._handleColor(d.bezierCurves[c].startPoint, this.drawConfig.bezier.pathVertex.color));
|
|
943
|
+
}
|
|
944
|
+
else {
|
|
945
|
+
df.diamondHandle(d.bezierCurves[c].startPoint, 7, this._handleColor(d.bezierCurves[c].startPoint, this.drawConfig.bezier.pathVertex.color));
|
|
916
946
|
}
|
|
917
|
-
d.bezierCurves[c].startPoint.attr.renderTime = renderTime;
|
|
918
947
|
}
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
948
|
+
d.bezierCurves[c].startPoint.attr.renderTime = renderTime;
|
|
949
|
+
if (d.bezierCurves[c].endPoint.attr.visible) {
|
|
950
|
+
var df = this.drawConfig.bezier.pathVertex.fill ? fill : draw;
|
|
951
|
+
df.setCurrentId(d.uid + "_h0");
|
|
952
|
+
df.setCurrentClassName(d.className + "-start-handle");
|
|
953
|
+
if (d.bezierCurves[c].endPoint.attr.bezierAutoAdjust) {
|
|
954
|
+
df.squareHandle(d.bezierCurves[c].endPoint, 5, this._handleColor(d.bezierCurves[c].endPoint, this.drawConfig.bezier.pathVertex.color));
|
|
955
|
+
}
|
|
956
|
+
else {
|
|
957
|
+
df.diamondHandle(d.bezierCurves[c].endPoint, 7, this._handleColor(d.bezierCurves[c].endPoint, this.drawConfig.bezier.pathVertex.color));
|
|
924
958
|
}
|
|
925
|
-
d.bezierCurves[c].endPoint.attr.renderTime = renderTime;
|
|
926
959
|
}
|
|
927
960
|
if (d.bezierCurves[c].startControlPoint.attr.visible) {
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
961
|
+
var df = this.drawConfig.bezier.controlVertex.fill ? fill : draw;
|
|
962
|
+
df.setCurrentId(d.uid + "_h2");
|
|
963
|
+
df.setCurrentClassName(d.className + "-start-control-handle");
|
|
964
|
+
df.circleHandle(d.bezierCurves[c].startControlPoint, 3, this._handleColor(d.bezierCurves[c].startControlPoint, this.drawConfig.bezier.controlVertex.color));
|
|
931
965
|
}
|
|
932
966
|
if (d.bezierCurves[c].endControlPoint.attr.visible) {
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
967
|
+
var df = this.drawConfig.bezier.controlVertex.fill ? fill : draw;
|
|
968
|
+
df.setCurrentId(d.uid + "_h3");
|
|
969
|
+
df.setCurrentClassName(d.className + "-end-control-handle");
|
|
970
|
+
df.circleHandle(d.bezierCurves[c].endControlPoint, 3, this._handleColor(d.bezierCurves[c].endControlPoint, this.drawConfig.bezier.controlVertex.color));
|
|
936
971
|
}
|
|
972
|
+
d.bezierCurves[c].startPoint.attr.renderTime = renderTime;
|
|
973
|
+
d.bezierCurves[c].endPoint.attr.renderTime = renderTime;
|
|
937
974
|
d.bezierCurves[c].startControlPoint.attr.renderTime = renderTime;
|
|
938
975
|
d.bezierCurves[c].endControlPoint.attr.renderTime = renderTime;
|
|
939
976
|
}
|
|
@@ -1049,6 +1086,16 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
1049
1086
|
d.lowerRight.attr.renderTime = renderTime;
|
|
1050
1087
|
}
|
|
1051
1088
|
}
|
|
1089
|
+
else if (d instanceof PBText_1.PBText) {
|
|
1090
|
+
fill.setCurrentId(d.uid);
|
|
1091
|
+
fill.text(d.text, d.anchor.x, d.anchor.y, d);
|
|
1092
|
+
if (this.drawConfig.text.anchor) {
|
|
1093
|
+
draw.setCurrentId(d.uid + "_a0");
|
|
1094
|
+
draw.setCurrentClassName(d.className + "-anchor");
|
|
1095
|
+
(this.drawConfig.text.fill ? fill : draw).point(d.anchor, this.drawConfig.text.color);
|
|
1096
|
+
}
|
|
1097
|
+
d.anchor.attr.renderTime = renderTime;
|
|
1098
|
+
}
|
|
1052
1099
|
else {
|
|
1053
1100
|
console.error("Cannot draw object. Unknown class.");
|
|
1054
1101
|
}
|