plotboilerplate 1.23.3 → 1.25.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.
Files changed (230) hide show
  1. package/README.md +19 -1
  2. package/dist/index.esm.js +1684 -394
  3. package/dist/index.esm.js.map +1 -1
  4. package/dist/index.esm.min.js +1 -1
  5. package/dist/index.esm.min.js.map +1 -1
  6. package/dist/plotboilerplate.browser.min.js +1 -1
  7. package/dist/plotboilerplate.browser.min.js.map +1 -1
  8. package/dist/plotboilerplate.js +12450 -11120
  9. package/dist/plotboilerplate.min.js +1 -1
  10. package/package.json +9 -5
  11. package/src/cjs/BezierPath.d.ts +41 -5
  12. package/src/cjs/BezierPath.js +52 -2
  13. package/src/cjs/BezierPath.js.map +1 -1
  14. package/src/cjs/Bounds.d.ts +67 -3
  15. package/src/cjs/Bounds.js +101 -3
  16. package/src/cjs/Bounds.js.map +1 -1
  17. package/src/cjs/Circle.d.ts +46 -4
  18. package/src/cjs/Circle.js +82 -3
  19. package/src/cjs/Circle.js.map +1 -1
  20. package/src/cjs/CircleSector.d.ts +51 -2
  21. package/src/cjs/CircleSector.js +112 -3
  22. package/src/cjs/CircleSector.js.map +1 -1
  23. package/src/cjs/CubicBezierCurve.d.ts +113 -7
  24. package/src/cjs/CubicBezierCurve.js +281 -33
  25. package/src/cjs/CubicBezierCurve.js.map +1 -1
  26. package/src/cjs/Line.d.ts +38 -3
  27. package/src/cjs/Line.js +64 -1
  28. package/src/cjs/Line.js.map +1 -1
  29. package/src/cjs/PlotBoilerplate.d.ts +37 -6
  30. package/src/cjs/PlotBoilerplate.js +224 -125
  31. package/src/cjs/PlotBoilerplate.js.map +1 -1
  32. package/src/cjs/Polygon.d.ts +68 -5
  33. package/src/cjs/Polygon.js +143 -22
  34. package/src/cjs/Polygon.js.map +1 -1
  35. package/src/cjs/Triangle.d.ts +52 -3
  36. package/src/cjs/Triangle.js +80 -1
  37. package/src/cjs/Triangle.js.map +1 -1
  38. package/src/cjs/VEllipse.d.ts +62 -3
  39. package/src/cjs/VEllipse.js +181 -17
  40. package/src/cjs/VEllipse.js.map +1 -1
  41. package/src/cjs/VEllipseSector.d.ts +86 -2
  42. package/src/cjs/VEllipseSector.js +148 -4
  43. package/src/cjs/VEllipseSector.js.map +1 -1
  44. package/src/cjs/Vector.d.ts +12 -2
  45. package/src/cjs/Vector.js +15 -2
  46. package/src/cjs/Vector.js.map +1 -1
  47. package/src/cjs/VertTuple.d.ts +28 -4
  48. package/src/cjs/VertTuple.js +36 -3
  49. package/src/cjs/VertTuple.js.map +1 -1
  50. package/src/cjs/Vertex.d.ts +31 -4
  51. package/src/cjs/Vertex.js +35 -1
  52. package/src/cjs/Vertex.js.map +1 -1
  53. package/src/cjs/interfaces/core.d.ts +67 -0
  54. package/src/cjs/interfaces/core.js +4 -0
  55. package/src/cjs/interfaces/core.js.map +1 -1
  56. package/src/cjs/utils/algorithms/convexPolygonIncircle.d.ts +2 -1
  57. package/src/cjs/utils/algorithms/convexPolygonIncircle.js +14 -6
  58. package/src/cjs/utils/algorithms/convexPolygonIncircle.js.map +1 -1
  59. package/src/cjs/utils/createRandomizedPolygon.d.ts +14 -0
  60. package/src/cjs/utils/createRandomizedPolygon.js +32 -0
  61. package/src/cjs/utils/createRandomizedPolygon.js.map +1 -0
  62. package/src/cjs/utils/datastructures/Color.d.ts +147 -1
  63. package/src/cjs/utils/datastructures/Color.js +385 -41
  64. package/src/cjs/utils/datastructures/Color.js.map +1 -1
  65. package/src/cjs/utils/datastructures/ColorGradient.d.ts +79 -0
  66. package/src/cjs/utils/datastructures/ColorGradient.js +171 -0
  67. package/src/cjs/utils/datastructures/ColorGradient.js.map +1 -0
  68. package/src/cjs/utils/dom/components/ColorGradientPicker.d.ts +245 -0
  69. package/src/cjs/utils/dom/components/ColorGradientPicker.js +667 -0
  70. package/src/cjs/utils/dom/components/ColorGradientPicker.js.map +1 -0
  71. package/src/cjs/utils/dom/components/ColorGradientPickerJSX.d.ts +129 -0
  72. package/src/cjs/utils/dom/components/ColorGradientPickerJSX.js +520 -0
  73. package/src/cjs/utils/dom/components/ColorGradientPickerJSX.js.map +1 -0
  74. package/src/cjs/utils/dom/components/ColorGradientSelector.d.ts +117 -0
  75. package/src/cjs/utils/dom/components/ColorGradientSelector.js +325 -0
  76. package/src/cjs/utils/dom/components/ColorGradientSelector.js.map +1 -0
  77. package/src/cjs/utils/dom/components/Test.d.ts +7 -0
  78. package/src/cjs/utils/dom/components/Test.js +30 -0
  79. package/src/cjs/utils/dom/components/Test.js.map +1 -0
  80. package/src/cjs/utils/dom/guiSizeToggler.js +1 -1
  81. package/src/cjs/utils/dom/guiSizeToggler.js.map +1 -1
  82. package/src/cjs/utils/helpers/BezierPathInteractionHelper.d.ts +16 -8
  83. package/src/cjs/utils/helpers/BezierPathInteractionHelper.js +49 -28
  84. package/src/cjs/utils/helpers/BezierPathInteractionHelper.js.map +1 -1
  85. package/src/cjs/utils/helpers/CircleHelper.d.ts +10 -1
  86. package/src/cjs/utils/helpers/CircleHelper.js +13 -2
  87. package/src/cjs/utils/helpers/CircleHelper.js.map +1 -1
  88. package/src/cjs/utils/helpers/CircleSectorHelper.d.ts +11 -2
  89. package/src/cjs/utils/helpers/CircleSectorHelper.js +20 -20
  90. package/src/cjs/utils/helpers/CircleSectorHelper.js.map +1 -1
  91. package/src/cjs/utils/helpers/TriangleHelper.d.ts +57 -0
  92. package/src/cjs/utils/helpers/TriangleHelper.js +83 -0
  93. package/src/cjs/utils/helpers/TriangleHelper.js.map +1 -0
  94. package/src/cjs/utils/helpers/VEllipseHelper.d.ts +32 -0
  95. package/src/cjs/utils/helpers/VEllipseHelper.js +88 -0
  96. package/src/cjs/utils/helpers/VEllipseHelper.js.map +1 -0
  97. package/src/cjs/utils/helpers/VEllipseSectorHelper.d.ts +44 -4
  98. package/src/cjs/utils/helpers/VEllipseSectorHelper.js +108 -25
  99. package/src/cjs/utils/helpers/VEllipseSectorHelper.js.map +1 -1
  100. package/src/cjs/utils/parsers/LinearColorGradientParser.d.ts +78 -0
  101. package/src/cjs/utils/parsers/LinearColorGradientParser.js +224 -0
  102. package/src/cjs/utils/parsers/LinearColorGradientParser.js.map +1 -0
  103. package/src/createDemoDrawables.js +4 -1
  104. package/src/esm/BezierPath.d.ts +41 -5
  105. package/src/esm/BezierPath.js +50 -2
  106. package/src/esm/BezierPath.js.map +1 -1
  107. package/src/esm/Bounds.d.ts +67 -3
  108. package/src/esm/Bounds.js +101 -3
  109. package/src/esm/Bounds.js.map +1 -1
  110. package/src/esm/Circle.d.ts +46 -4
  111. package/src/esm/Circle.js +79 -3
  112. package/src/esm/Circle.js.map +1 -1
  113. package/src/esm/CircleSector.d.ts +51 -2
  114. package/src/esm/CircleSector.js +108 -3
  115. package/src/esm/CircleSector.js.map +1 -1
  116. package/src/esm/CubicBezierCurve.d.ts +113 -7
  117. package/src/esm/CubicBezierCurve.js +277 -33
  118. package/src/esm/CubicBezierCurve.js.map +1 -1
  119. package/src/esm/Line.d.ts +38 -3
  120. package/src/esm/Line.js +62 -1
  121. package/src/esm/Line.js.map +1 -1
  122. package/src/esm/PlotBoilerplate.d.ts +37 -6
  123. package/src/esm/PlotBoilerplate.js +224 -125
  124. package/src/esm/PlotBoilerplate.js.map +1 -1
  125. package/src/esm/Polygon.d.ts +68 -5
  126. package/src/esm/Polygon.js +138 -22
  127. package/src/esm/Polygon.js.map +1 -1
  128. package/src/esm/Triangle.d.ts +52 -3
  129. package/src/esm/Triangle.js +77 -1
  130. package/src/esm/Triangle.js.map +1 -1
  131. package/src/esm/VEllipse.d.ts +62 -3
  132. package/src/esm/VEllipse.js +178 -17
  133. package/src/esm/VEllipse.js.map +1 -1
  134. package/src/esm/VEllipseSector.d.ts +86 -2
  135. package/src/esm/VEllipseSector.js +146 -7
  136. package/src/esm/VEllipseSector.js.map +1 -1
  137. package/src/esm/Vector.d.ts +12 -2
  138. package/src/esm/Vector.js +15 -2
  139. package/src/esm/Vector.js.map +1 -1
  140. package/src/esm/VertTuple.d.ts +28 -4
  141. package/src/esm/VertTuple.js +36 -3
  142. package/src/esm/VertTuple.js.map +1 -1
  143. package/src/esm/Vertex.d.ts +31 -4
  144. package/src/esm/Vertex.js +35 -1
  145. package/src/esm/Vertex.js.map +1 -1
  146. package/src/esm/interfaces/core.d.ts +67 -0
  147. package/src/esm/interfaces/core.js +4 -0
  148. package/src/esm/interfaces/core.js.map +1 -1
  149. package/src/esm/utils/algorithms/convexPolygonIncircle.d.ts +2 -1
  150. package/src/esm/utils/algorithms/convexPolygonIncircle.js +15 -7
  151. package/src/esm/utils/algorithms/convexPolygonIncircle.js.map +1 -1
  152. package/src/esm/utils/algorithms/createRandomizedPolygon.d.ts +14 -0
  153. package/src/esm/utils/algorithms/createRandomizedPolygon.js +28 -0
  154. package/src/esm/utils/algorithms/createRandomizedPolygon.js.map +1 -0
  155. package/src/esm/utils/createRandomizedPolygon.d.ts +14 -0
  156. package/src/esm/utils/createRandomizedPolygon.js +28 -0
  157. package/src/esm/utils/createRandomizedPolygon.js.map +1 -0
  158. package/src/esm/utils/datastructures/Color.d.ts +147 -1
  159. package/src/esm/utils/datastructures/Color.js +386 -42
  160. package/src/esm/utils/datastructures/Color.js.map +1 -1
  161. package/src/esm/utils/datastructures/ColorGradient.d.ts +79 -0
  162. package/src/esm/utils/datastructures/ColorGradient.js +166 -0
  163. package/src/esm/utils/datastructures/ColorGradient.js.map +1 -0
  164. package/src/esm/utils/dom/components/ColorGradientPicker.d.ts +245 -0
  165. package/src/esm/utils/dom/components/ColorGradientPicker.js +732 -0
  166. package/src/esm/utils/dom/components/ColorGradientPicker.js.map +1 -0
  167. package/src/esm/utils/dom/components/ColorGradientPickerJSX.d.ts +129 -0
  168. package/src/esm/utils/dom/components/ColorGradientPickerJSX.js +582 -0
  169. package/src/esm/utils/dom/components/ColorGradientPickerJSX.js.map +1 -0
  170. package/src/esm/utils/dom/components/ColorGradientSelector.d.ts +117 -0
  171. package/src/esm/utils/dom/components/ColorGradientSelector.js +332 -0
  172. package/src/esm/utils/dom/components/ColorGradientSelector.js.map +1 -0
  173. package/src/esm/utils/dom/components/Test.d.ts +7 -0
  174. package/src/esm/utils/dom/components/Test.js +26 -0
  175. package/src/esm/utils/dom/components/Test.js.map +1 -0
  176. package/src/esm/utils/dom/guiSizeToggler.js +1 -1
  177. package/src/esm/utils/dom/guiSizeToggler.js.map +1 -1
  178. package/src/esm/utils/helpers/BezierPathInteractionHelper.d.ts +16 -8
  179. package/src/esm/utils/helpers/BezierPathInteractionHelper.js +47 -27
  180. package/src/esm/utils/helpers/BezierPathInteractionHelper.js.map +1 -1
  181. package/src/esm/utils/helpers/CircleHelper.d.ts +10 -1
  182. package/src/esm/utils/helpers/CircleHelper.js +13 -2
  183. package/src/esm/utils/helpers/CircleHelper.js.map +1 -1
  184. package/src/esm/utils/helpers/CircleSectorHelper.d.ts +11 -2
  185. package/src/esm/utils/helpers/CircleSectorHelper.js +20 -20
  186. package/src/esm/utils/helpers/CircleSectorHelper.js.map +1 -1
  187. package/src/esm/utils/helpers/TriangleHelper.d.ts +57 -0
  188. package/src/esm/utils/helpers/TriangleHelper.js +78 -0
  189. package/src/esm/utils/helpers/TriangleHelper.js.map +1 -0
  190. package/src/esm/utils/helpers/VEllipseHelper.d.ts +32 -0
  191. package/src/esm/utils/helpers/VEllipseHelper.js +83 -0
  192. package/src/esm/utils/helpers/VEllipseHelper.js.map +1 -0
  193. package/src/esm/utils/helpers/VEllipseSectorHelper.d.ts +44 -4
  194. package/src/esm/utils/helpers/VEllipseSectorHelper.js +107 -24
  195. package/src/esm/utils/helpers/VEllipseSectorHelper.js.map +1 -1
  196. package/src/esm/utils/parsers/LinearColorGradientParser.d.ts +78 -0
  197. package/src/esm/utils/parsers/LinearColorGradientParser.js +217 -0
  198. package/src/esm/utils/parsers/LinearColorGradientParser.js.map +1 -0
  199. package/src/external.d.ts +9 -0
  200. package/src/ts/BezierPath.ts +58 -5
  201. package/src/ts/Bounds.ts +110 -6
  202. package/src/ts/Circle.ts +87 -5
  203. package/src/ts/CircleSector.ts +115 -5
  204. package/src/ts/CubicBezierCurve.ts +332 -42
  205. package/src/ts/Line.ts +66 -3
  206. package/src/ts/PlotBoilerplate.ts +236 -114
  207. package/src/ts/Polygon.ts +164 -29
  208. package/src/ts/Triangle.ts +85 -3
  209. package/src/ts/VEllipse.ts +214 -19
  210. package/src/ts/VEllipseSector.ts +154 -8
  211. package/src/ts/Vector.ts +16 -2
  212. package/src/ts/VertTuple.ts +39 -4
  213. package/src/ts/Vertex.ts +40 -4
  214. package/src/ts/interfaces/core.ts +73 -0
  215. package/src/ts/utils/algorithms/convexPolygonIncircle.ts +82 -78
  216. package/src/ts/utils/createRandomizedPolygon.ts +31 -0
  217. package/src/ts/utils/datastructures/Color.ts +423 -44
  218. package/src/ts/utils/datastructures/ColorGradient.ts +196 -0
  219. package/src/ts/utils/dom/components/ColorGradientPicker.tsx +877 -0
  220. package/src/ts/utils/dom/components/ColorGradientSelector.tsx +445 -0
  221. package/src/ts/utils/dom/components/Test.tsx +44 -0
  222. package/src/ts/utils/dom/components/_ColorGradientPicker_raw.ts_ +392 -0
  223. package/src/ts/utils/dom/guiSizeToggler.ts +1 -1
  224. package/src/ts/utils/helpers/BezierPathInteractionHelper.ts +61 -35
  225. package/src/ts/utils/helpers/CircleHelper.ts +17 -3
  226. package/src/ts/utils/helpers/CircleSectorHelper.ts +118 -126
  227. package/src/ts/utils/helpers/TriangleHelper.ts +102 -0
  228. package/src/ts/utils/helpers/VEllipseHelper.ts +115 -0
  229. package/src/ts/utils/helpers/VEllipseSectorHelper.ts +144 -26
  230. package/src/ts/utils/parsers/LinearColorGradientParser.ts +297 -0
@@ -0,0 +1,117 @@
1
+ /**
2
+ * A simple class for rendering color gradient dropdowns.
3
+ *
4
+ * As native dropdown do not support custom stylings in the way we need, we will implement
5
+ * our own dropdown class.
6
+ *
7
+ * @author Ikaros Kappler
8
+ * @date 2025-08-19
9
+ * @version 1.0.0
10
+ */
11
+ import { ColorGradient } from "../../datastructures/ColorGradient";
12
+ export type ColorGradientSelectorChangeListener = (colorGradient: ColorGradient, gradientIndex: number, source: ColorGradientSelector) => void;
13
+ /**
14
+ * The initial properties to use.
15
+ */
16
+ export interface ColorGradientSelectorProps {
17
+ containerID?: string;
18
+ initialGradients?: Array<ColorGradient>;
19
+ selectedGradientIndex?: number;
20
+ isMobileMode?: boolean;
21
+ }
22
+ export declare class ColorGradientSelector {
23
+ private readonly baseID;
24
+ private readonly elementID;
25
+ private container;
26
+ private containerRef;
27
+ private mainButtonContainerRef;
28
+ private positioningContainerRef;
29
+ private isMobileMode;
30
+ private isDropdownOpen;
31
+ private css_buttonWidth;
32
+ private css_buttonHeight;
33
+ private css_buttonFontSize;
34
+ private colorGradients;
35
+ private colorGradientOptionRefs;
36
+ private selectedGradientIndex;
37
+ private readonly installedChangeListeners;
38
+ static readonly DEFAULT_COLOR_GRADIENTS: Array<ColorGradient>;
39
+ /**
40
+ * The constructor: creates a new color gradient picker in the given container.
41
+ * If no container or ID is given then a new unbound `container` will be created (DIV).
42
+ *
43
+ * Pass a container ID or nothing – in the latter case the constructor will create
44
+ * a new DIV element.
45
+ *
46
+ * @param {string?} containerID - (optional) If you want to use an existing container (should be a DIV).
47
+ */
48
+ constructor(options?: ColorGradientSelectorProps);
49
+ setGradients(gradients: Array<ColorGradient>, selectedIndex: number): void;
50
+ addGradient(gradient: ColorGradient): void;
51
+ private __removeAllChildNodes;
52
+ /**
53
+ * Adds a new color gradient change listener to this ColorGradientPicker.
54
+ *
55
+ * @param {ColorGradientChangeListener} listener - The listener to add.
56
+ * @returns {boolean} True, if the listener was added and did not exist before.
57
+ */
58
+ addChangeListener(listener: ColorGradientSelectorChangeListener): boolean;
59
+ /**
60
+ *
61
+ * @param {ColorGradientChangeListener} listener The listener to remove.
62
+ * @returns {boolean} True, if the listener existed and has been removed.
63
+ */
64
+ removeChangeListener(listener: ColorGradientSelectorChangeListener): boolean;
65
+ getSelectedColorGradient(): ColorGradient;
66
+ private __fireChangeEvent;
67
+ /**
68
+ * Creates a handler for click events on the main button.
69
+ *
70
+ * @returns
71
+ */
72
+ private __mainButtonClickHandler;
73
+ /**
74
+ * Creates a handler for click events on one of the option button in the dropdown.
75
+ *
76
+ * @returns
77
+ */
78
+ private __optionButtonClickHandler;
79
+ private __optionButtonDeleteHandler;
80
+ /**
81
+ * Once a slider element was added or removed then the following indices must be updated.
82
+ *
83
+ * @param {number} startIndex - The slider index to start updating at.
84
+ */
85
+ __updateOptionDataSetIndices(startIndex: number): void;
86
+ private __setSelectedIndex;
87
+ /**
88
+ * Sets the backround color of the main button (of this dropdown) element.
89
+ *
90
+ * @param {ColorGradient} gradient - The gradient color to display. Must not be null.
91
+ */
92
+ private __setMainButtonGradient;
93
+ /**
94
+ * Renders a new option button for the dropdown menu.
95
+ *
96
+ * @param {ColorGradient} gradient
97
+ * @returns {JsxElement}
98
+ */
99
+ private __renderOptionButton;
100
+ /**
101
+ * Creates a new array of option buttons (refs).
102
+ * @returns
103
+ */
104
+ private _renderAllOptionButtons;
105
+ /**
106
+ * Init the container contents.
107
+ *
108
+ * @private
109
+ */
110
+ private _render;
111
+ /**
112
+ * Adds custom styles (global STYLE tag).
113
+ *
114
+ * @private
115
+ */
116
+ private __createCustomStylesElement;
117
+ }
@@ -0,0 +1,332 @@
1
+ /**
2
+ * A simple class for rendering color gradient dropdowns.
3
+ *
4
+ * As native dropdown do not support custom stylings in the way we need, we will implement
5
+ * our own dropdown class.
6
+ *
7
+ * @author Ikaros Kappler
8
+ * @date 2025-08-19
9
+ * @version 1.0.0
10
+ */
11
+ import * as NoReact from "noreact";
12
+ import { Color } from "../../datastructures/Color";
13
+ import { ColorGradient } from "../../datastructures/ColorGradient";
14
+ export class ColorGradientSelector {
15
+ /**
16
+ * The constructor: creates a new color gradient picker in the given container.
17
+ * If no container or ID is given then a new unbound `container` will be created (DIV).
18
+ *
19
+ * Pass a container ID or nothing – in the latter case the constructor will create
20
+ * a new DIV element.
21
+ *
22
+ * @param {string?} containerID - (optional) If you want to use an existing container (should be a DIV).
23
+ */
24
+ constructor(options) {
25
+ this.isDropdownOpen = false;
26
+ this.css_buttonWidth = "100px";
27
+ this.css_buttonHeight = "1.8em";
28
+ this.css_buttonFontSize = "0.725em";
29
+ this.colorGradients = [];
30
+ // TODO: this does not really need to be a pair, does it?
31
+ this.colorGradientOptionRefs = [];
32
+ this.selectedGradientIndex = -1;
33
+ this.installedChangeListeners = [];
34
+ /**
35
+ * Adds custom styles (global STYLE tag).
36
+ *
37
+ * @private
38
+ */
39
+ this.__createCustomStylesElement = () => {
40
+ // Thanks to Ana Tudor
41
+ // https://css-tricks.com/multi-thumb-sliders-particular-two-thumb-case/
42
+ return (NoReact.createElement("style", null, `
43
+
44
+ #${this.elementID} button {
45
+ border: 0px solid lightgray;
46
+ padding: 0.25em;
47
+ background-color: rgba(255,255,255,0.9);
48
+ }
49
+
50
+ #${this.elementID} .main-button:hover {
51
+ background-color: rgba(216,216,216,0.9);
52
+ }
53
+
54
+ #${this.elementID} .option-gradient-button:hover, #${this.elementID} .option-delete-button:hover {
55
+ background-color: rgba(216,216,216,0.9);
56
+ }
57
+
58
+ `));
59
+ };
60
+ options = options || {};
61
+ if (options.containerID) {
62
+ const cont = document.getElementById(options.containerID);
63
+ if (!cont) {
64
+ throw "Cannot create ColorGradientPicker. Component ID does not exist.";
65
+ }
66
+ this.container = cont;
67
+ }
68
+ else {
69
+ this.container = document.createElement("div");
70
+ }
71
+ this.isMobileMode = Boolean(options.isMobileMode);
72
+ if (this.isMobileMode) {
73
+ this.css_buttonWidth = "200px";
74
+ this.css_buttonHeight = "2.5em";
75
+ this.css_buttonFontSize = "1.25em";
76
+ }
77
+ this.baseID = Math.floor(Math.random() * 65535);
78
+ this.elementID = `color-gradient-selector-${this.baseID}`;
79
+ this.colorGradients =
80
+ typeof options.initialGradients === "undefined" ? ColorGradientSelector.DEFAULT_COLOR_GRADIENTS : options.initialGradients;
81
+ this.selectedGradientIndex = typeof options.selectedGradientIndex === "undefined" ? 0 : options.selectedGradientIndex;
82
+ document.head.appendChild(this.__createCustomStylesElement());
83
+ this.container.append(this._render());
84
+ } // END constructor
85
+ // TODO: implement this?
86
+ setGradients(gradients, selectedIndex) {
87
+ // First empty the container
88
+ this.__removeAllChildNodes(this.positioningContainerRef.current);
89
+ this.colorGradients = [];
90
+ this.colorGradientOptionRefs = [];
91
+ this.selectedGradientIndex = selectedIndex;
92
+ // Re-render button array
93
+ gradients.map((grad) => {
94
+ this.addGradient(grad);
95
+ });
96
+ }
97
+ addGradient(gradient) {
98
+ // Render a new button
99
+ const index = this.colorGradients.length;
100
+ const refMainContainer = NoReact.useRef();
101
+ const refActionButton = NoReact.useRef();
102
+ const refDeleteButton = NoReact.useRef();
103
+ this.__renderOptionButton(gradient, index, refMainContainer, refActionButton, refDeleteButton);
104
+ this.colorGradients.push(gradient);
105
+ this.colorGradientOptionRefs.push({ mainButton: refActionButton, deleteButton: refDeleteButton });
106
+ // Add to container
107
+ this.positioningContainerRef.current.appendChild(refMainContainer.current);
108
+ }
109
+ // +---------------------------------------------------------------------------------
110
+ // | A helper function to remove all child nodes.
111
+ // +-------------------------------
112
+ __removeAllChildNodes(node) {
113
+ while (node.lastChild) {
114
+ node.removeChild(node.lastChild);
115
+ }
116
+ }
117
+ /**
118
+ * Adds a new color gradient change listener to this ColorGradientPicker.
119
+ *
120
+ * @param {ColorGradientChangeListener} listener - The listener to add.
121
+ * @returns {boolean} True, if the listener was added and did not exist before.
122
+ */
123
+ addChangeListener(listener) {
124
+ for (var i = 0; i < this.installedChangeListeners.length; i++) {
125
+ if (this.installedChangeListeners[i] === listener) {
126
+ return false;
127
+ }
128
+ }
129
+ this.installedChangeListeners.push(listener);
130
+ return true;
131
+ }
132
+ /**
133
+ *
134
+ * @param {ColorGradientChangeListener} listener The listener to remove.
135
+ * @returns {boolean} True, if the listener existed and has been removed.
136
+ */
137
+ removeChangeListener(listener) {
138
+ for (var i = 0; i < this.installedChangeListeners.length; i++) {
139
+ if (this.installedChangeListeners[i] === listener) {
140
+ this.installedChangeListeners.splice(i, 1);
141
+ return true;
142
+ }
143
+ }
144
+ return false;
145
+ }
146
+ getSelectedColorGradient() {
147
+ return this.colorGradients[this.selectedGradientIndex];
148
+ }
149
+ __fireChangeEvent() {
150
+ const newColorGradient = this.getSelectedColorGradient();
151
+ for (var i = 0; i < this.installedChangeListeners.length; i++) {
152
+ this.installedChangeListeners[i](newColorGradient, this.selectedGradientIndex, this);
153
+ }
154
+ }
155
+ /**
156
+ * Creates a handler for click events on the main button.
157
+ *
158
+ * @returns
159
+ */
160
+ __mainButtonClickHandler() {
161
+ const _self = this;
162
+ return (_evt) => {
163
+ // _self.mainButtonContainerRef.current.style.visibility = "hidden";
164
+ _self.positioningContainerRef.current.style.visibility = _self.isDropdownOpen ? "hidden" : "visible";
165
+ _self.isDropdownOpen = !_self.isDropdownOpen;
166
+ };
167
+ }
168
+ /**
169
+ * Creates a handler for click events on one of the option button in the dropdown.
170
+ *
171
+ * @returns
172
+ */
173
+ __optionButtonClickHandler() {
174
+ const _self = this;
175
+ return (evt) => {
176
+ _self.positioningContainerRef.current.style.visibility = "hidden";
177
+ _self.isDropdownOpen = false;
178
+ const targetButton = evt.currentTarget;
179
+ const clickedIndex_raw = targetButton.dataset["gradientIndex"];
180
+ const clickedIndex = Number.parseInt(clickedIndex_raw);
181
+ console.log("clickedIndex", clickedIndex, clickedIndex_raw, targetButton.dataset, targetButton);
182
+ if (Number.isNaN(clickedIndex)) {
183
+ // Stop here. This is not what we want.
184
+ return;
185
+ }
186
+ // Find child: and set selected.
187
+ _self.__setSelectedIndex(clickedIndex);
188
+ _self.__fireChangeEvent();
189
+ };
190
+ }
191
+ __optionButtonDeleteHandler() {
192
+ const _self = this;
193
+ return (evt) => {
194
+ if (this.colorGradientOptionRefs.length === 1) {
195
+ // Keep the last record
196
+ return;
197
+ }
198
+ const targetButton = evt.currentTarget;
199
+ const clickedIndex_raw = targetButton.dataset["gradientIndex"];
200
+ const clickedIndex = Number.parseInt(clickedIndex_raw);
201
+ console.log("clickedIndex", clickedIndex, clickedIndex_raw, targetButton.dataset, targetButton);
202
+ if (Number.isNaN(clickedIndex)) {
203
+ // Stop here. This is not what we want.
204
+ return;
205
+ }
206
+ // Find child: and remove from DOM
207
+ console.log("this.colorGradientOptionRefs", this.colorGradientOptionRefs, "clickedIndex", clickedIndex);
208
+ const refPair = this.colorGradientOptionRefs[clickedIndex];
209
+ refPair.mainButton.current.parentElement.remove();
210
+ // Remove from logic
211
+ // Remove 1 element at the given index
212
+ this.colorGradients.splice(clickedIndex, 1);
213
+ this.colorGradientOptionRefs.splice(clickedIndex, 1);
214
+ // Update all following elements in the list.
215
+ this.__updateOptionDataSetIndices(clickedIndex);
216
+ if (this.selectedGradientIndex >= clickedIndex) {
217
+ // this.selectedGradientIndex--;
218
+ this.__setSelectedIndex(this.selectedGradientIndex);
219
+ }
220
+ console.log("All refs", this.colorGradientOptionRefs);
221
+ };
222
+ }
223
+ /**
224
+ * Once a slider element was added or removed then the following indices must be updated.
225
+ *
226
+ * @param {number} startIndex - The slider index to start updating at.
227
+ */
228
+ __updateOptionDataSetIndices(startIndex) {
229
+ // Update all elements to the right of the new elelemt
230
+ for (var i = startIndex; i < this.colorGradientOptionRefs.length; i++) {
231
+ this.colorGradientOptionRefs[i].mainButton.current.dataset["gradientIndex"] = `${i}`;
232
+ this.colorGradientOptionRefs[i].deleteButton.current.dataset["gradientIndex"] = `${i}`;
233
+ }
234
+ }
235
+ __setSelectedIndex(newSelectedIndex) {
236
+ for (var i = 0; i < this.colorGradientOptionRefs.length; i++) {
237
+ const ref = this.colorGradientOptionRefs[i].mainButton;
238
+ // Find child: and set selected.
239
+ ref.current.querySelectorAll(".option-gradient-radio-circle")[0].innerHTML = newSelectedIndex === i ? "🞊" : "🞅";
240
+ }
241
+ this.selectedGradientIndex = newSelectedIndex;
242
+ const selectedGradient = this.colorGradients[this.selectedGradientIndex];
243
+ // Display new gradient in the main button
244
+ this.__setMainButtonGradient(selectedGradient);
245
+ }
246
+ /**
247
+ * Sets the backround color of the main button (of this dropdown) element.
248
+ *
249
+ * @param {ColorGradient} gradient - The gradient color to display. Must not be null.
250
+ */
251
+ __setMainButtonGradient(gradient) {
252
+ const colorDisplay = this.mainButtonContainerRef.current.querySelectorAll(".main-button-gradient-display")[0];
253
+ colorDisplay.style["background"] = gradient.toColorGradientString();
254
+ }
255
+ /**
256
+ * Renders a new option button for the dropdown menu.
257
+ *
258
+ * @param {ColorGradient} gradient
259
+ * @returns {JsxElement}
260
+ */
261
+ __renderOptionButton(gradient, index, refMainContainer, refActionButton, refDelButton) {
262
+ return (NoReact.createElement("div", { sx: { d: "flex", flexDirection: "row" }, ref: refMainContainer },
263
+ NoReact.createElement("button", { className: "option-gradient-button", onClick: this.__optionButtonClickHandler(), style: {
264
+ d: "flex",
265
+ w: "100%",
266
+ fontSize: this.css_buttonFontSize,
267
+ minHeight: this.css_buttonHeight,
268
+ maxHeight: this.css_buttonHeight
269
+ }, ref: refActionButton, "data-gradientIndex": `${index}` },
270
+ NoReact.createElement("div", { className: "option-gradient-radio-circle", sx: { w: "2em", flexShrink: 2, alignContent: "center" } }, index === 0 ? "🞊" : "🞅"),
271
+ NoReact.createElement("div", { sx: { w: "calc( 100% - 2em )", mr: "1em", background: gradient.toColorGradientString() } }, "\u00A0")),
272
+ NoReact.createElement("button", { classname: "option-delete-button", sx: { fontSize: this.css_buttonFontSize, minHeight: this.css_buttonHeight, maxHeight: this.css_buttonHeight }, onClick: this.__optionButtonDeleteHandler(), "data-gradientIndex": `${index}`, ref: refDelButton },
273
+ NoReact.createElement("div", { sx: { w: "2em", flexShrink: 2, alignContent: "center" } }, "\uD83D\uDDD1"))));
274
+ }
275
+ /**
276
+ * Creates a new array of option buttons (refs).
277
+ * @returns
278
+ */
279
+ _renderAllOptionButtons() {
280
+ const _self = this;
281
+ // First clear all references
282
+ _self.colorGradientOptionRefs = [];
283
+ return this.colorGradients.map((colorGradient, index) => {
284
+ // console.log("num", num, index);
285
+ const refMainContainer = NoReact.useRef();
286
+ const refActionButton = NoReact.useRef();
287
+ const refDelButton = NoReact.useRef();
288
+ _self.colorGradientOptionRefs.push({ mainButton: refActionButton, deleteButton: refDelButton });
289
+ return this.__renderOptionButton(colorGradient, index, refMainContainer, refActionButton, refDelButton);
290
+ });
291
+ }
292
+ /**
293
+ * Init the container contents.
294
+ *
295
+ * @private
296
+ */
297
+ _render() {
298
+ const _self = this;
299
+ // console.log("Rendering ...", NoReact);
300
+ this.containerRef = NoReact.useRef();
301
+ this.mainButtonContainerRef = NoReact.useRef();
302
+ this.positioningContainerRef = NoReact.useRef();
303
+ const selectedGradient = this.colorGradients[this.selectedGradientIndex];
304
+ return (NoReact.createElement("div", { id: this.elementID, className: "color-gradient-selector", style: { minWidth: this.css_buttonWidth, maxWidth: this.css_buttonWidth, pos: "relative" }, ref: this.containerRef },
305
+ NoReact.createElement("button", { className: "main-button", ref: this.mainButtonContainerRef, style: {
306
+ d: "flex",
307
+ minWidth: this.css_buttonWidth,
308
+ maxWidth: this.css_buttonWidth,
309
+ minHeight: this.css_buttonHeight,
310
+ maxHeight: this.css_buttonHeight
311
+ }, onClick: this.__mainButtonClickHandler() },
312
+ NoReact.createElement("div", { className: "main-button-gradient-display", sx: { w: `calc( 100% - ${this.css_buttonFontSize} )`, background: selectedGradient.toColorGradientString() } }, "\u00A0"),
313
+ NoReact.createElement("div", { sx: { w: this.css_buttonHeight, flexShrink: 2, fontSize: this.css_buttonFontSize } }, "\u25BE")),
314
+ NoReact.createElement("div", { className: "positioning-container", ref: this.positioningContainerRef, style: {
315
+ minWidth: this.css_buttonWidth,
316
+ maxHeight: "25vh",
317
+ overflowY: "auto",
318
+ v: "hidden",
319
+ d: "flex",
320
+ fd: "column",
321
+ pos: "absolute",
322
+ l: 0,
323
+ zIndex: 999
324
+ } }, _self._renderAllOptionButtons())));
325
+ } // END function render()
326
+ }
327
+ ColorGradientSelector.DEFAULT_COLOR_GRADIENTS = [
328
+ ColorGradient.createDefault(),
329
+ ColorGradient.createFrom(Color.Red, Color.Green),
330
+ ColorGradient.createFrom(Color.Blue, Color.Gold)
331
+ ];
332
+ //# sourceMappingURL=ColorGradientSelector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorGradientSelector.js","sourceRoot":"","sources":["../../../../ts/utils/dom/components/ColorGradientSelector.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAkBnE,MAAM,OAAO,qBAAqB;IAgChC;;;;;;;;OAQG;IACH,YAAY,OAAoC;QA/BxC,mBAAc,GAAY,KAAK,CAAC;QAEhC,oBAAe,GAAG,OAAO,CAAC;QAC1B,qBAAgB,GAAG,OAAO,CAAC;QAC3B,uBAAkB,GAAG,SAAS,CAAC;QAE/B,mBAAc,GAAyB,EAAE,CAAC;QAClD,yDAAyD;QACjD,4BAAuB,GAG1B,EAAE,CAAC;QACA,0BAAqB,GAAW,CAAC,CAAC,CAAC;QAE1B,6BAAwB,GAA+C,EAAE,CAAC;QAuW3F;;;;WAIG;QACK,gCAA2B,GAAG,GAAG,EAAE;YACzC,sBAAsB;YACtB,2EAA2E;YAC3E,OAAO,CACL,qCAAQ;;OAEP,IAAI,CAAC,SAAS;;;;;;OAMd,IAAI,CAAC,SAAS;;;;OAId,IAAI,CAAC,SAAS,oCAAoC,IAAI,CAAC,SAAS;;;;KAIlE,CAAS,CACT,CAAC;QACJ,CAAC,CAAC;QAhXA,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;QACxB,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;YACxB,MAAM,IAAI,GAAG,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;YAC1D,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,MA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,KAAK,CAAC,KAAK,CAAC;IAChD,aAAa,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC;CACjD,AAJ6C,CAI5C"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @author Ikaros Kappler
3
+ * @date 2025-06-25
4
+ * @version 1.0.0
5
+ */
6
+ import { JsxElement } from "typescript";
7
+ export declare const Test: (name: string) => JsxElement;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @author Ikaros Kappler
3
+ * @date 2025-06-25
4
+ * @version 1.0.0
5
+ */
6
+ import * as NoReact from "noreact";
7
+ export const Test = (name) => {
8
+ const click1 = () => {
9
+ console.log("First clicked");
10
+ };
11
+ const click2 = () => {
12
+ console.log("Second clicked");
13
+ };
14
+ const mouseEnter = (event) => {
15
+ event.target.style["background-color"] = "grey";
16
+ };
17
+ const mouseOut = (event) => {
18
+ event.target.style["background-color"] = "DeepSkyBlue";
19
+ };
20
+ return (NoReact.createElement("div", { className: "NoReact-main" },
21
+ "Hello ",
22
+ name,
23
+ NoReact.createElement("div", { className: "NoReact-child-1", onClick: click1 }, "Hello Nested"),
24
+ NoReact.createElement("div", { className: "NoReact-child-2", onClick: click2, onMouseEnter: mouseEnter, onMouseOut: mouseOut, style: { backgroundColor: "yellow" } }, "Hello Nested 2")));
25
+ };
26
+ //# sourceMappingURL=Test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Test.js","sourceRoot":"","sources":["../../../../ts/utils/dom/components/Test.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,IAAY,EAAc,EAAE;IAC/C,MAAM,MAAM,GAAG,GAAG,EAAE;QAClB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAC/B,CAAC,CAAC;IAEF,MAAM,MAAM,GAAG,GAAG,EAAE;QAClB,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAChC,CAAC,CAAC;IAEF,MAAM,UAAU,GAAG,CAAC,KAAY,EAAE,EAAE;QACjC,KAAK,CAAC,MAAyB,CAAC,KAAK,CAAC,kBAAkB,CAAC,GAAG,MAAM,CAAC;IACtE,CAAC,CAAC;IAEF,MAAM,QAAQ,GAAG,CAAC,KAAY,EAAE,EAAE;QAC/B,KAAK,CAAC,MAAyB,CAAC,KAAK,CAAC,kBAAkB,CAAC,GAAG,aAAa,CAAC;IAC7E,CAAC,CAAC;IAEF,OAAO,CACL,+BAAK,SAAS,EAAC,cAAc;;QACpB,IAAI;QACX,+BAAK,SAAS,EAAC,iBAAiB,EAAC,OAAO,EAAE,MAAM,mBAE1C;QACN,+BACE,SAAS,EAAC,iBAAiB,EAC3B,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,UAAU,EACxB,UAAU,EAAE,QAAQ,EACpB,KAAK,EAAE,EAAE,eAAe,EAAE,QAAQ,EAAE,qBAGhC,CACF,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -21,7 +21,7 @@ const applyGuiSize = (gui, guiDoubleSize, cssProps) => {
21
21
  gui.domElement.style["transform-origin"] = "100% 0%";
22
22
  }
23
23
  const transform = cssProps && cssProps.hasOwnProperty("transform") ? cssProps["transform"] + " " : "";
24
- console.log("transform", transform);
24
+ // console.log("transform", transform);
25
25
  if (guiDoubleSize) {
26
26
  gui.domElement.style["transform"] = transform + "scale(2.0)";
27
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"guiSizeToggler.js","sourceRoot":"","sources":["../../../ts/utils/dom/guiSizeToggler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAQH;;;;GAIG;AACH,MAAM,YAAY,GAAG,CAAC,GAAQ,EAAE,aAAsB,EAAE,QAAgC,EAAE,EAAE;IAC1F,IAAI,QAAQ,IAAI,QAAQ,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,CAAC;QAC3D,GAAG,CAAC,UAA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C,iBAAiB,CAAC,EAAE,CAAC;QAC3D,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,kBAAkB,CAAC,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACzE,CAAC;SAAM,CAAC;QACN,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,kBAAkB,CAAC,GAAG,SAAS,CAAC;IACvD,CAAC;IAED,MAAM,SAAS,GAAG,QAAQ,IAAI,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAEtG,uCAAuC;IACvC,IAAI,aAAa,EAAE,CAAC;QAClB,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,SAAS,GAAG,YAAY,CAAC;IAC/D,CAAC;SAAM,CAAC;QACN,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,SAAS,GAAG,YAAY,CAAC;IAC/D,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAQ,EAAE,MAAsB,EAAE,QAAgC,EAAE,EAAE;IACnG,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,gBAAgB,CAAC;IACtD,OAAO;QACL,MAAM,EAAE;YACN,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,QAAQ,CAAC,CAAC;QAC7D,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -22,7 +22,13 @@
22
22
  * @modified 2021-03-31 Fixed the issue with the new AlloyFinger (Typescript).
23
23
  * @modified 2022-02-03 Changing the element to catch events (eventCatcher instead of canvas).
24
24
  * @modified 2024-03-10 Fixing some types for Typescript 5 compatibility.
25
- * @version 1.1.3
25
+ * @modified 2025-04-14 Added the `BezierPathInteractionHelper.drawHandleLines` method.
26
+ * @modified 2025-04-14 Fixing correct event types for touch events in `BezierPathInteractionHelper`.
27
+ * @modified 2025-04-14 BezierPathInteractionHelper: Changed default value of `HelperOptions.autoAdjustPaths` from `true` to `false`.
28
+ * @modified 2025-05-05 Added optional params `draw` and `fill` to BezierPathInteractionHelper.drawHandleLines` method.
29
+ * @modified 2025-05-05 Class `BezierPathInteractionHelper` now implementing `IShapeInteractionHelper`.
30
+ * @modified 2025-05-07 Tweaking performance of `BezierPathInteractionHelper`: only triggering redraw now when mouse move within given detect range.
31
+ * @version 1.2.1
26
32
  *
27
33
  * @file BezierPathInteractionHelper
28
34
  * @public
@@ -31,6 +37,7 @@ import { BezierPath } from "../../BezierPath";
31
37
  import { PlotBoilerplate } from "../../PlotBoilerplate";
32
38
  import { VertListener } from "../../VertexListeners";
33
39
  import { Vertex } from "../../Vertex";
40
+ import { DrawLib, IShapeInteractionHelper } from "../../interfaces";
34
41
  /**
35
42
  * Handler type for mouse-pointer-moved listeners.
36
43
  */
@@ -70,7 +77,7 @@ interface HelperOptions {
70
77
  *
71
78
  * @public
72
79
  **/
73
- export declare class BezierPathInteractionHelper {
80
+ export declare class BezierPathInteractionHelper implements IShapeInteractionHelper {
74
81
  /**
75
82
  * @member {PlotBoilerplate} pb
76
83
  * @memberof BezierPathInteractionHelper
@@ -164,6 +171,13 @@ export declare class BezierPathInteractionHelper {
164
171
  * @return {void}
165
172
  **/
166
173
  update(): void;
174
+ /**
175
+ * Draw grey handle lines.
176
+ *
177
+ * @param {DrawLib<any>} draw - (optional) The draw library to use. If not provided then `pb.draw` will be used.
178
+ * @param {DrawLib<any>} fill - (optional) The fill library to use. If not provided then `pb.fill` will be used.
179
+ */
180
+ drawHandleLines(draw?: DrawLib<any>, fill?: DrawLib<any>): void;
167
181
  /**
168
182
  * This function should invalidate any installed listeners and invalidate this object.
169
183
  * After calling this function the object might not hold valid data any more and
@@ -188,12 +202,6 @@ export declare class BezierPathInteractionHelper {
188
202
  private _removeDefaultPathListeners;
189
203
  private _updateMinDistance;
190
204
  static setPathAutoAdjust(path: BezierPath): void;
191
- /**
192
- * A helper function to add drag-start-listener to given vertices.
193
- */
194
- /**
195
- * A helper function to remove drag-start-listener to given vertices.
196
- */
197
205
  /**
198
206
  * A helper function to add drag-start listeners to all vertices of the given path.
199
207
  *