plotboilerplate 1.22.0 → 1.23.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 +2 -0
- package/dist/index.esm.js +222 -76
- 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 +492 -337
- package/dist/plotboilerplate.min.js +1 -1
- package/package.json +5 -4
- package/src/cjs/BezierPath.js.map +1 -1
- package/src/cjs/Bounds.js +1 -1
- package/src/cjs/Bounds.js.map +1 -1
- package/src/cjs/Circle.js.map +1 -1
- package/src/cjs/CircleSector.d.ts +64 -1
- package/src/cjs/CircleSector.js +121 -1
- package/src/cjs/CircleSector.js.map +1 -1
- package/src/cjs/CubicBezierCurve.js +2 -2
- package/src/cjs/CubicBezierCurve.js.map +1 -1
- package/src/cjs/Grid.js.map +1 -1
- package/src/cjs/KeyHandler.d.ts +1 -1
- package/src/cjs/KeyHandler.js +13 -13
- package/src/cjs/KeyHandler.js.map +1 -1
- package/src/cjs/Line.js +2 -0
- package/src/cjs/Line.js.map +1 -1
- package/src/cjs/MouseHandler.d.ts +2 -2
- package/src/cjs/MouseHandler.js +7 -5
- package/src/cjs/MouseHandler.js.map +1 -1
- package/src/cjs/PlotBoilerplate.d.ts +1 -1
- package/src/cjs/PlotBoilerplate.js +77 -63
- package/src/cjs/PlotBoilerplate.js.map +1 -1
- package/src/cjs/Polygon.js.map +1 -1
- package/src/cjs/Triangle.js +1 -1
- package/src/cjs/Triangle.js.map +1 -1
- package/src/cjs/UIDGenerator.js +1 -1
- package/src/cjs/UIDGenerator.js.map +1 -1
- package/src/cjs/VEllipse.js.map +1 -1
- package/src/cjs/VEllipseSector.js +1 -1
- package/src/cjs/VEllipseSector.js.map +1 -1
- package/src/cjs/Vector.js +2 -0
- package/src/cjs/Vector.js.map +1 -1
- package/src/cjs/VertTuple.js.map +1 -1
- package/src/cjs/Vertex.d.ts +3 -2
- package/src/cjs/Vertex.js +13 -7
- package/src/cjs/Vertex.js.map +1 -1
- package/src/cjs/VertexAttr.d.ts +2 -1
- package/src/cjs/VertexAttr.js +2 -1
- package/src/cjs/VertexAttr.js.map +1 -1
- package/src/cjs/VertexListeners.d.ts +1 -1
- package/src/cjs/VertexListeners.js.map +1 -1
- package/src/cjs/draw.js +1 -1
- package/src/cjs/draw.js.map +1 -1
- package/src/cjs/drawgl.js.map +1 -1
- package/src/cjs/drawutilssvg.d.ts +17 -3
- package/src/cjs/drawutilssvg.js +97 -91
- package/src/cjs/drawutilssvg.js.map +1 -1
- package/src/cjs/geomutils.js +2 -2
- package/src/cjs/geomutils.js.map +1 -1
- package/src/cjs/index.js +5 -1
- package/src/cjs/index.js.map +1 -1
- package/src/cjs/interfaces/DrawLib.d.ts +2 -2
- package/src/cjs/interfaces/core.d.ts +3 -3
- package/src/cjs/interfaces/index.js +5 -1
- package/src/cjs/interfaces/index.js.map +1 -1
- package/src/cjs/utils/NGons.d.ts +13 -0
- package/src/cjs/utils/NGons.js +36 -0
- package/src/cjs/utils/NGons.js.map +1 -0
- package/src/cjs/utils/Params.js.map +1 -1
- package/src/cjs/utils/WebColors.js.map +1 -1
- package/src/cjs/utils/WebColorsContrast.js +1 -1
- package/src/cjs/utils/WebColorsContrast.js.map +1 -1
- package/src/cjs/utils/algorithms/CatmullRomPath.js.map +1 -1
- package/src/cjs/utils/algorithms/CircleIntersections.d.ts +3 -2
- package/src/cjs/utils/algorithms/CircleIntersections.js +12 -20
- package/src/cjs/utils/algorithms/CircleIntersections.js.map +1 -1
- package/src/cjs/utils/algorithms/ContourLineDetection.js +5 -5
- package/src/cjs/utils/algorithms/ContourLineDetection.js.map +1 -1
- package/src/cjs/utils/algorithms/CubicSplinePath.js.map +1 -1
- package/src/cjs/utils/algorithms/HobbyPath.js.map +1 -1
- package/src/cjs/utils/algorithms/Metaballs.d.ts +30 -0
- package/src/cjs/utils/algorithms/Metaballs.js +114 -0
- package/src/cjs/utils/algorithms/Metaballs.js.map +1 -0
- package/src/cjs/utils/algorithms/arrayResize.d.ts +8 -0
- package/src/cjs/utils/algorithms/arrayResize.js +24 -0
- package/src/cjs/utils/algorithms/arrayResize.js.map +1 -0
- package/src/cjs/utils/algorithms/clearDuplicateVertices.js.map +1 -1
- package/src/cjs/utils/algorithms/clearPolygonDuplicateVertices.js.map +1 -1
- package/src/cjs/utils/algorithms/convexHull.js.map +1 -1
- package/src/cjs/utils/algorithms/convexPolygonIncircle.js.map +1 -1
- package/src/cjs/utils/algorithms/delaunay.js.map +1 -1
- package/src/cjs/utils/algorithms/delaunay2voronoi.js.map +1 -1
- package/src/cjs/utils/algorithms/detectPaths.js.map +1 -1
- package/src/cjs/utils/algorithms/findPolygonSelfIntersections.js.map +1 -1
- package/src/cjs/utils/algorithms/matrixFill.js +1 -1
- package/src/cjs/utils/algorithms/matrixFill.js.map +1 -1
- package/src/cjs/utils/algorithms/splitPolygonToNonIntersecting.js.map +1 -1
- package/src/cjs/utils/algorithms/sutherlandHodgman.js.map +1 -1
- package/src/cjs/utils/cloneVertexArray.js.map +1 -1
- package/src/cjs/utils/creategui.js +20 -12
- package/src/cjs/utils/datastructures/CircularIntervalSet.js.map +1 -1
- package/src/cjs/utils/datastructures/Color.d.ts +2 -1
- package/src/cjs/utils/datastructures/Color.js +35 -16
- package/src/cjs/utils/datastructures/Color.js.map +1 -1
- package/src/cjs/utils/datastructures/DataGrid2d.d.ts +1 -1
- package/src/cjs/utils/datastructures/DataGrid2dListAdapter.d.ts +2 -2
- package/src/cjs/utils/datastructures/DataGrid2dListAdapter.js +1 -1
- package/src/cjs/utils/datastructures/DataGrid2dListAdapter.js.map +1 -1
- package/src/cjs/utils/datastructures/GenericPath.js.map +1 -1
- package/src/cjs/utils/datastructures/Girih.d.ts +3 -2
- package/src/cjs/utils/datastructures/Girih.js +2 -1
- package/src/cjs/utils/datastructures/Girih.js.map +1 -1
- package/src/cjs/utils/datastructures/GirihBowtie.js +2 -0
- package/src/cjs/utils/datastructures/GirihBowtie.js.map +1 -1
- package/src/cjs/utils/datastructures/GirihDecagon.js +2 -0
- package/src/cjs/utils/datastructures/GirihDecagon.js.map +1 -1
- package/src/cjs/utils/datastructures/GirihHexagon.js +2 -0
- package/src/cjs/utils/datastructures/GirihHexagon.js.map +1 -1
- package/src/cjs/utils/datastructures/GirihPenroseRhombus.js +3 -1
- package/src/cjs/utils/datastructures/GirihPenroseRhombus.js.map +1 -1
- package/src/cjs/utils/datastructures/GirihPentagon.js +2 -0
- package/src/cjs/utils/datastructures/GirihPentagon.js.map +1 -1
- package/src/cjs/utils/datastructures/GirihRhombus.js +2 -0
- package/src/cjs/utils/datastructures/GirihRhombus.js.map +1 -1
- package/src/cjs/utils/datastructures/GirihTile.js +4 -2
- package/src/cjs/utils/datastructures/GirihTile.js.map +1 -1
- package/src/cjs/utils/datastructures/Matrix4x4.js.map +1 -1
- package/src/cjs/utils/datastructures/VoronoiCell.js.map +1 -1
- package/src/cjs/utils/datastructures/interfaces.d.ts +3 -3
- package/src/cjs/utils/detectDarkMode.js.map +1 -1
- package/src/cjs/utils/dom/getAvailableContainerSpace.js +1 -1
- package/src/cjs/utils/dom/getAvailableContainerSpace.js.map +1 -1
- package/src/cjs/utils/findInVertexArray.js.map +1 -1
- package/src/cjs/utils/gup.d.ts +8 -0
- package/src/cjs/utils/gup.js +8 -0
- package/src/cjs/utils/gup.js.map +1 -1
- package/src/cjs/utils/helpers/BezierPathInteractionHelper.d.ts +6 -5
- package/src/cjs/utils/helpers/BezierPathInteractionHelper.js +3 -2
- package/src/cjs/utils/helpers/BezierPathInteractionHelper.js.map +1 -1
- package/src/cjs/utils/helpers/CircleHelper.d.ts +38 -3
- package/src/cjs/utils/helpers/CircleHelper.js +51 -11
- package/src/cjs/utils/helpers/CircleHelper.js.map +1 -1
- package/src/cjs/utils/helpers/CircleSectorHelper.d.ts +47 -1
- package/src/cjs/utils/helpers/CircleSectorHelper.js +85 -14
- package/src/cjs/utils/helpers/CircleSectorHelper.js.map +1 -1
- package/src/cjs/utils/io/FileDrop.d.ts +3 -3
- package/src/cjs/utils/io/FileDrop.js.map +1 -1
- package/src/cjs/utils/parsers/OBJParser.d.ts +2 -2
- package/src/cjs/utils/parsers/OBJParser.js.map +1 -1
- package/src/cjs/utils/parsers/STLParser.d.ts +4 -3
- package/src/cjs/utils/parsers/STLParser.js +62 -12
- package/src/cjs/utils/parsers/STLParser.js.map +1 -1
- package/src/cjs/utils/parsers/svg/parseSVGPathData.js +1 -1
- package/src/cjs/utils/parsers/svg/parseSVGPathData.js.map +1 -1
- package/src/cjs/utils/parsers/svg/splitSVGPathData.js.map +1 -1
- package/src/cjs/utils/parsers/svg/types.d.ts +13 -13
- package/src/createDemoDrawables.js +48 -3
- package/src/esm/BezierPath.js.map +1 -1
- package/src/esm/Bounds.js.map +1 -1
- package/src/esm/Circle.js.map +1 -1
- package/src/esm/CircleSector.d.ts +64 -1
- package/src/esm/CircleSector.js +121 -1
- package/src/esm/CircleSector.js.map +1 -1
- package/src/esm/CubicBezierCurve.js.map +1 -1
- package/src/esm/Grid.js.map +1 -1
- package/src/esm/KeyHandler.d.ts +1 -1
- package/src/esm/KeyHandler.js +13 -13
- package/src/esm/KeyHandler.js.map +1 -1
- package/src/esm/Line.js.map +1 -1
- package/src/esm/MouseHandler.d.ts +2 -2
- package/src/esm/MouseHandler.js +4 -4
- package/src/esm/MouseHandler.js.map +1 -1
- package/src/esm/PlotBoilerplate.d.ts +1 -1
- package/src/esm/PlotBoilerplate.js +43 -29
- package/src/esm/PlotBoilerplate.js.map +1 -1
- package/src/esm/Polygon.js.map +1 -1
- package/src/esm/Triangle.js.map +1 -1
- package/src/esm/VEllipse.js.map +1 -1
- package/src/esm/VEllipseSector.js +1 -1
- package/src/esm/VEllipseSector.js.map +1 -1
- package/src/esm/Vector.js.map +1 -1
- package/src/esm/VertTuple.js.map +1 -1
- package/src/esm/Vertex.d.ts +3 -2
- package/src/esm/Vertex.js +9 -3
- package/src/esm/Vertex.js.map +1 -1
- package/src/esm/VertexAttr.d.ts +2 -1
- package/src/esm/VertexAttr.js +2 -1
- package/src/esm/VertexAttr.js.map +1 -1
- package/src/esm/VertexListeners.d.ts +1 -1
- package/src/esm/VertexListeners.js.map +1 -1
- package/src/esm/draw.js.map +1 -1
- package/src/esm/drawgl.js.map +1 -1
- package/src/esm/drawutilssvg.d.ts +17 -3
- package/src/esm/drawutilssvg.js +28 -22
- package/src/esm/drawutilssvg.js.map +1 -1
- package/src/esm/geomutils.js +2 -2
- package/src/esm/geomutils.js.map +1 -1
- package/src/esm/interfaces/DrawLib.d.ts +2 -2
- package/src/esm/interfaces/core.d.ts +3 -3
- package/src/esm/utils/NGons.d.ts +13 -0
- package/src/esm/utils/NGons.js +33 -0
- package/src/esm/utils/NGons.js.map +1 -0
- package/src/esm/utils/Params.js.map +1 -1
- package/src/esm/utils/WebColors.js.map +1 -1
- package/src/esm/utils/algorithms/CatmullRomPath.js.map +1 -1
- package/src/esm/utils/algorithms/CircleIntersections.d.ts +3 -2
- package/src/esm/utils/algorithms/CircleIntersections.js +11 -19
- package/src/esm/utils/algorithms/CircleIntersections.js.map +1 -1
- package/src/esm/utils/algorithms/ContourLineDetection.js.map +1 -1
- package/src/esm/utils/algorithms/CubicSplinePath.js.map +1 -1
- package/src/esm/utils/algorithms/HobbyPath.js.map +1 -1
- package/src/esm/utils/algorithms/Metaballs.d.ts +30 -0
- package/src/esm/utils/algorithms/Metaballs.js +109 -0
- package/src/esm/utils/algorithms/Metaballs.js.map +1 -0
- package/src/esm/utils/algorithms/arrayResize.d.ts +8 -0
- package/src/esm/utils/algorithms/arrayResize.js +20 -0
- package/src/esm/utils/algorithms/arrayResize.js.map +1 -0
- package/src/esm/utils/algorithms/clearDuplicateVertices.js.map +1 -1
- package/src/esm/utils/algorithms/clearPolygonDuplicateVertices.js.map +1 -1
- package/src/esm/utils/algorithms/convexHull.js.map +1 -1
- package/src/esm/utils/algorithms/convexPolygonIncircle.js.map +1 -1
- package/src/esm/utils/algorithms/delaunay.js.map +1 -1
- package/src/esm/utils/algorithms/delaunay2voronoi.js.map +1 -1
- package/src/esm/utils/algorithms/detectPaths.js.map +1 -1
- package/src/esm/utils/algorithms/findPolygonSelfIntersections.js.map +1 -1
- package/src/esm/utils/algorithms/matrixFill.js.map +1 -1
- package/src/esm/utils/algorithms/splitPolygonToNonIntersecting.js.map +1 -1
- package/src/esm/utils/algorithms/sutherlandHodgman.js.map +1 -1
- package/src/esm/utils/cloneVertexArray.js.map +1 -1
- package/src/esm/utils/datastructures/CircularIntervalSet.js.map +1 -1
- package/src/esm/utils/datastructures/Color.d.ts +2 -1
- package/src/esm/utils/datastructures/Color.js +33 -14
- package/src/esm/utils/datastructures/Color.js.map +1 -1
- package/src/esm/utils/datastructures/DataGrid2d.d.ts +1 -1
- package/src/esm/utils/datastructures/DataGrid2dListAdapter.d.ts +2 -2
- package/src/esm/utils/datastructures/DataGrid2dListAdapter.js.map +1 -1
- package/src/esm/utils/datastructures/GenericPath.js.map +1 -1
- package/src/esm/utils/datastructures/Girih.d.ts +3 -2
- package/src/esm/utils/datastructures/Girih.js +2 -1
- package/src/esm/utils/datastructures/Girih.js.map +1 -1
- package/src/esm/utils/datastructures/GirihBowtie.js.map +1 -1
- package/src/esm/utils/datastructures/GirihDecagon.js.map +1 -1
- package/src/esm/utils/datastructures/GirihHexagon.js.map +1 -1
- package/src/esm/utils/datastructures/GirihPenroseRhombus.js +1 -1
- package/src/esm/utils/datastructures/GirihPenroseRhombus.js.map +1 -1
- package/src/esm/utils/datastructures/GirihPentagon.js.map +1 -1
- package/src/esm/utils/datastructures/GirihRhombus.js.map +1 -1
- package/src/esm/utils/datastructures/GirihTile.js.map +1 -1
- package/src/esm/utils/datastructures/Matrix4x4.js.map +1 -1
- package/src/esm/utils/datastructures/VoronoiCell.js.map +1 -1
- package/src/esm/utils/datastructures/interfaces.d.ts +3 -3
- package/src/esm/utils/detectDarkMode.js.map +1 -1
- package/src/esm/utils/findInVertexArray.js.map +1 -1
- package/src/esm/utils/gup.d.ts +8 -0
- package/src/esm/utils/gup.js +8 -0
- package/src/esm/utils/gup.js.map +1 -1
- package/src/esm/utils/helpers/BezierPathInteractionHelper.d.ts +6 -5
- package/src/esm/utils/helpers/BezierPathInteractionHelper.js +3 -2
- package/src/esm/utils/helpers/BezierPathInteractionHelper.js.map +1 -1
- package/src/esm/utils/helpers/CircleHelper.d.ts +38 -3
- package/src/esm/utils/helpers/CircleHelper.js +51 -11
- package/src/esm/utils/helpers/CircleHelper.js.map +1 -1
- package/src/esm/utils/helpers/CircleSectorHelper.d.ts +47 -1
- package/src/esm/utils/helpers/CircleSectorHelper.js +85 -14
- package/src/esm/utils/helpers/CircleSectorHelper.js.map +1 -1
- package/src/esm/utils/io/FileDrop.d.ts +3 -3
- package/src/esm/utils/io/FileDrop.js.map +1 -1
- package/src/esm/utils/parsers/OBJParser.d.ts +2 -2
- package/src/esm/utils/parsers/OBJParser.js.map +1 -1
- package/src/esm/utils/parsers/STLParser.d.ts +4 -3
- package/src/esm/utils/parsers/STLParser.js +63 -13
- package/src/esm/utils/parsers/STLParser.js.map +1 -1
- package/src/esm/utils/parsers/svg/parseSVGPathData.js.map +1 -1
- package/src/esm/utils/parsers/svg/splitSVGPathData.js.map +1 -1
- package/src/esm/utils/parsers/svg/types.d.ts +13 -13
- package/src/index-gl.js +77 -85
- package/src/index.js +124 -129
- package/src/ts/CircleSector.ts +134 -3
- package/src/ts/PlotBoilerplate.ts +20 -11
- package/src/ts/Vertex.ts +8 -3
- package/src/ts/VertexAttr.ts +3 -2
- package/src/ts/drawutilssvg.ts +38 -25
- package/src/ts/geomutils.ts +60 -64
- package/src/ts/interfaces/DrawLib.ts +0 -15
- package/src/ts/utils/NGons.ts +35 -0
- package/src/ts/utils/algorithms/CircleIntersections.ts +280 -288
- package/src/ts/utils/algorithms/Metaballs.ts +144 -0
- package/src/ts/utils/algorithms/arrayResize.ts +22 -0
- package/src/ts/utils/datastructures/Color.ts +39 -15
- package/src/ts/utils/datastructures/Girih.ts +9 -8
- package/src/ts/utils/gup.ts +10 -2
- package/src/ts/utils/helpers/BezierPathInteractionHelper.ts +9 -8
- package/src/ts/utils/helpers/CircleHelper.ts +70 -22
- package/src/ts/utils/helpers/CircleSectorHelper.ts +101 -17
- package/src/ts/utils/parsers/STLParser.ts +50 -16
package/dist/plotboilerplate.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/******/ "use strict";
|
|
3
3
|
/******/ var __webpack_modules__ = ({
|
|
4
4
|
|
|
5
|
-
/***/
|
|
5
|
+
/***/ 597:
|
|
6
6
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7
7
|
|
|
8
8
|
// ESM COMPAT FLAG
|
|
@@ -10,11 +10,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10
10
|
|
|
11
11
|
// EXPORTS
|
|
12
12
|
__webpack_require__.d(__webpack_exports__, {
|
|
13
|
-
|
|
14
|
-
"default": () => /* binding */ esm
|
|
13
|
+
AlloyFinger: () => (/* reexport */ AlloyFinger),
|
|
14
|
+
"default": () => (/* binding */ esm)
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
;// CONCATENATED MODULE: ./node_modules/alloyfinger-typescript/src/esm/alloy_finger.js
|
|
18
18
|
/* Port from AlloyFinger v0.1.15
|
|
19
19
|
* Original by dntzhang
|
|
20
20
|
* Typescript port by Ikaros Kappler
|
|
@@ -404,7 +404,7 @@ class AlloyFinger {
|
|
|
404
404
|
;
|
|
405
405
|
/* harmony default export */ const alloy_finger = ((/* unused pure expression or super */ null && (AlloyFinger)));
|
|
406
406
|
//# sourceMappingURL=alloy_finger.js.map
|
|
407
|
-
|
|
407
|
+
;// CONCATENATED MODULE: ./node_modules/alloyfinger-typescript/src/esm/index.js
|
|
408
408
|
/**
|
|
409
409
|
* TypeScript port by Ikaros Kappler.
|
|
410
410
|
*
|
|
@@ -419,7 +419,7 @@ class AlloyFinger {
|
|
|
419
419
|
|
|
420
420
|
/***/ }),
|
|
421
421
|
|
|
422
|
-
/***/
|
|
422
|
+
/***/ 733:
|
|
423
423
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
424
424
|
|
|
425
425
|
|
|
@@ -457,10 +457,10 @@ class AlloyFinger {
|
|
|
457
457
|
**/
|
|
458
458
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
459
459
|
exports.BezierPath = void 0;
|
|
460
|
-
var Bounds_1 = __webpack_require__(
|
|
461
|
-
var CubicBezierCurve_1 = __webpack_require__(
|
|
462
|
-
var UIDGenerator_1 = __webpack_require__(
|
|
463
|
-
var Vertex_1 = __webpack_require__(
|
|
460
|
+
var Bounds_1 = __webpack_require__(76);
|
|
461
|
+
var CubicBezierCurve_1 = __webpack_require__(973);
|
|
462
|
+
var UIDGenerator_1 = __webpack_require__(938);
|
|
463
|
+
var Vertex_1 = __webpack_require__(787);
|
|
464
464
|
/**
|
|
465
465
|
* @classdesc A BezierPath class.
|
|
466
466
|
*
|
|
@@ -1502,7 +1502,7 @@ exports.BezierPath = BezierPath;
|
|
|
1502
1502
|
|
|
1503
1503
|
/***/ }),
|
|
1504
1504
|
|
|
1505
|
-
/***/
|
|
1505
|
+
/***/ 76:
|
|
1506
1506
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1507
1507
|
|
|
1508
1508
|
|
|
@@ -1521,8 +1521,8 @@ exports.BezierPath = BezierPath;
|
|
|
1521
1521
|
**/
|
|
1522
1522
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1523
1523
|
exports.Bounds = void 0;
|
|
1524
|
-
var Polygon_1 = __webpack_require__(
|
|
1525
|
-
var Vertex_1 = __webpack_require__(
|
|
1524
|
+
var Polygon_1 = __webpack_require__(687);
|
|
1525
|
+
var Vertex_1 = __webpack_require__(787);
|
|
1526
1526
|
/**
|
|
1527
1527
|
* @classdesc A bounds class with min and max values. Implementing IBounds.
|
|
1528
1528
|
*
|
|
@@ -1598,7 +1598,7 @@ var Bounds = /** @class */ (function () {
|
|
|
1598
1598
|
* @returns {string} Get these bounds in a human readable form.
|
|
1599
1599
|
*/
|
|
1600
1600
|
Bounds.prototype.toString = function () {
|
|
1601
|
-
return "{ min: "
|
|
1601
|
+
return "{ min: ".concat(this.min.toString(), ", max : ").concat(this.max.toString(), ", width: ").concat(this.width, ", height : ").concat(this.height, " }");
|
|
1602
1602
|
};
|
|
1603
1603
|
/**
|
|
1604
1604
|
* Clone this bounds object (create a deep clone).
|
|
@@ -1657,7 +1657,7 @@ exports.Bounds = Bounds;
|
|
|
1657
1657
|
|
|
1658
1658
|
/***/ }),
|
|
1659
1659
|
|
|
1660
|
-
/***/
|
|
1660
|
+
/***/ 118:
|
|
1661
1661
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1662
1662
|
|
|
1663
1663
|
|
|
@@ -1679,10 +1679,10 @@ exports.Bounds = Bounds;
|
|
|
1679
1679
|
**/
|
|
1680
1680
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1681
1681
|
exports.Circle = void 0;
|
|
1682
|
-
var Line_1 = __webpack_require__(
|
|
1683
|
-
var UIDGenerator_1 = __webpack_require__(
|
|
1684
|
-
var Vector_1 = __webpack_require__(
|
|
1685
|
-
var Vertex_1 = __webpack_require__(
|
|
1682
|
+
var Line_1 = __webpack_require__(939);
|
|
1683
|
+
var UIDGenerator_1 = __webpack_require__(938);
|
|
1684
|
+
var Vector_1 = __webpack_require__(30);
|
|
1685
|
+
var Vertex_1 = __webpack_require__(787);
|
|
1686
1686
|
/**
|
|
1687
1687
|
* @classdesc A simple circle: center point and radius.
|
|
1688
1688
|
*
|
|
@@ -1923,7 +1923,7 @@ exports.Circle = Circle;
|
|
|
1923
1923
|
|
|
1924
1924
|
/***/ }),
|
|
1925
1925
|
|
|
1926
|
-
/***/
|
|
1926
|
+
/***/ 135:
|
|
1927
1927
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1928
1928
|
|
|
1929
1929
|
|
|
@@ -1932,11 +1932,17 @@ exports.Circle = Circle;
|
|
|
1932
1932
|
* @date 2020-12-17
|
|
1933
1933
|
* @modified 2021-01-20 Added UID.
|
|
1934
1934
|
* @modified 2021-02-26 Fixed an error in the svg-arc-calculation (case angle<90deg and anti-clockwise).
|
|
1935
|
-
* @
|
|
1935
|
+
* @modified 2024-01-30 Added a missing type in the `describeSVGArc` function.
|
|
1936
|
+
* @modified 2024-03-01 Added the `getStartPoint` and `getEndPoint` methods.
|
|
1937
|
+
* @modified 2024-03-08 Added the `containsAngle` method.
|
|
1938
|
+
* @modified 2024-03-09 Added the `circleSectorIntersection` method to find coherent sector intersections..
|
|
1939
|
+
* @modified 2024-03-09 Added the `angleAt` method to determine any angle at some ratio.
|
|
1940
|
+
* @version 1.2.0
|
|
1936
1941
|
**/
|
|
1937
1942
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1938
1943
|
exports.CircleSector = void 0;
|
|
1939
|
-
var
|
|
1944
|
+
var Circle_1 = __webpack_require__(118);
|
|
1945
|
+
var UIDGenerator_1 = __webpack_require__(938);
|
|
1940
1946
|
/**
|
|
1941
1947
|
* @classdesc A simple circle sector: circle, start- and end-angle.
|
|
1942
1948
|
*
|
|
@@ -1966,10 +1972,124 @@ var CircleSector = /** @class */ (function () {
|
|
|
1966
1972
|
this.startAngle = startAngle;
|
|
1967
1973
|
this.endAngle = endAngle;
|
|
1968
1974
|
}
|
|
1975
|
+
/**
|
|
1976
|
+
* Checks wether the given angle (must be inside 0 and PI*2) is contained inside this sector.
|
|
1977
|
+
*
|
|
1978
|
+
* @param {number} angle - The numeric angle to check.
|
|
1979
|
+
* @method containsAngle
|
|
1980
|
+
* @instance
|
|
1981
|
+
* @memberof CircleSector
|
|
1982
|
+
* @return {boolean} True if (and only if) this sector contains the given angle.
|
|
1983
|
+
*/
|
|
1984
|
+
CircleSector.prototype.containsAngle = function (angle) {
|
|
1985
|
+
if (this.startAngle <= this.endAngle) {
|
|
1986
|
+
return angle >= this.startAngle && angle < this.endAngle;
|
|
1987
|
+
}
|
|
1988
|
+
else {
|
|
1989
|
+
// startAngle > endAngle
|
|
1990
|
+
return angle >= this.startAngle || angle < this.endAngle;
|
|
1991
|
+
}
|
|
1992
|
+
};
|
|
1993
|
+
/**
|
|
1994
|
+
* Get the angle inside this sector for a given ratio. 0.0 means startAngle, and 1.0 means endAngle.
|
|
1995
|
+
*
|
|
1996
|
+
* @param {number} t - The ratio inside [0..1].
|
|
1997
|
+
* @method angleAt
|
|
1998
|
+
* @instance
|
|
1999
|
+
* @memberof CircleSector
|
|
2000
|
+
* @return {number} The angle inside this sector at a given ratio.
|
|
2001
|
+
*/
|
|
2002
|
+
CircleSector.prototype.angleAt = function (t) {
|
|
2003
|
+
if (this.startAngle <= this.endAngle) {
|
|
2004
|
+
var angleAtRatio = this.startAngle + (this.endAngle - this.startAngle) * t;
|
|
2005
|
+
return angleAtRatio % (Math.PI * 2.0);
|
|
2006
|
+
}
|
|
2007
|
+
else {
|
|
2008
|
+
// startAngle > endAngle
|
|
2009
|
+
var angleAtRatio = this.startAngle + (Math.PI * 2 - this.startAngle + this.endAngle) * t;
|
|
2010
|
+
return angleAtRatio % (Math.PI * 2.0);
|
|
2011
|
+
}
|
|
2012
|
+
};
|
|
2013
|
+
/**
|
|
2014
|
+
* Get the sectors starting point (on the underlying circle, located at the start angle).
|
|
2015
|
+
*
|
|
2016
|
+
* @method getStartPoint
|
|
2017
|
+
* @instance
|
|
2018
|
+
* @memberof CircleSector
|
|
2019
|
+
* @return {Vertex} The sector's stating point.
|
|
2020
|
+
*/
|
|
2021
|
+
CircleSector.prototype.getStartPoint = function () {
|
|
2022
|
+
return this.circle.vertAt(this.startAngle);
|
|
2023
|
+
};
|
|
2024
|
+
/**
|
|
2025
|
+
* Get the sectors ending point (on the underlying circle, located at the end angle).
|
|
2026
|
+
*
|
|
2027
|
+
* @method getEndPoint
|
|
2028
|
+
* @instance
|
|
2029
|
+
* @memberof CircleSector
|
|
2030
|
+
* @return {Vertex} The sector's ending point.
|
|
2031
|
+
*/
|
|
2032
|
+
CircleSector.prototype.getEndPoint = function () {
|
|
2033
|
+
return this.circle.vertAt(this.endAngle);
|
|
2034
|
+
};
|
|
2035
|
+
/**
|
|
2036
|
+
* Calculate the intersection of this circle sector and some other sector.
|
|
2037
|
+
*
|
|
2038
|
+
* If the two sectors do not corerently intersect (when not both points of the
|
|
2039
|
+
* radical line are containted in both source sectors) then null is returned.
|
|
2040
|
+
*
|
|
2041
|
+
* See demo/53-circle-sector-intersections for a geometric visualisation.
|
|
2042
|
+
*
|
|
2043
|
+
* @method circleSectorIntersection
|
|
2044
|
+
* @instance
|
|
2045
|
+
* @memberof CircleSector
|
|
2046
|
+
* @return {CircleSector | null} The intersecion of both sectors or null if they don't intersect.
|
|
2047
|
+
*/
|
|
2048
|
+
CircleSector.prototype.circleSectorIntersection = function (sector) {
|
|
2049
|
+
var radicalLine = this.circle.circleIntersection(sector.circle);
|
|
2050
|
+
if (!radicalLine) {
|
|
2051
|
+
// The circles to not intersect at all.
|
|
2052
|
+
return null;
|
|
2053
|
+
}
|
|
2054
|
+
// Circles intersect. Check if this sector interval intersects, too.
|
|
2055
|
+
var thisIntersectionAngleA = this.circle.center.angle(radicalLine.a);
|
|
2056
|
+
var thisIntersectionAngleB = this.circle.center.angle(radicalLine.b);
|
|
2057
|
+
// Is intersection inside this sector?
|
|
2058
|
+
if (!this.containsAngle(thisIntersectionAngleA) || !this.containsAngle(thisIntersectionAngleB)) {
|
|
2059
|
+
// At least one circle intersection point is not located in this sector.
|
|
2060
|
+
// -> no valid intersection at all
|
|
2061
|
+
return null;
|
|
2062
|
+
}
|
|
2063
|
+
// Circles intersect. Check if the passed sector interval intersects, too.
|
|
2064
|
+
var thatIntersectionAngleA = sector.circle.center.angle(radicalLine.a);
|
|
2065
|
+
var thatIntersectionAngleB = sector.circle.center.angle(radicalLine.b);
|
|
2066
|
+
// Is intersection inside this sector?
|
|
2067
|
+
if (!sector.containsAngle(thatIntersectionAngleA) || !sector.containsAngle(thatIntersectionAngleB)) {
|
|
2068
|
+
// At least one circle intersection point is not located in this sector.
|
|
2069
|
+
// -> no valid intersection at all
|
|
2070
|
+
return null;
|
|
2071
|
+
}
|
|
2072
|
+
// The radical line has no direction. Thus the resulting sector _might_ be in reverse order.
|
|
2073
|
+
// Make a quick logical check: the center of the gap must still be located inside the result sector.
|
|
2074
|
+
// If not: reverse result.
|
|
2075
|
+
var gapSector = new CircleSector(this.circle, this.endAngle, this.startAngle);
|
|
2076
|
+
var centerOfOriginalGap = gapSector.angleAt(0.5);
|
|
2077
|
+
var resultSector = new CircleSector(new Circle_1.Circle(this.circle.center.clone(), this.circle.radius), thisIntersectionAngleA, thisIntersectionAngleB);
|
|
2078
|
+
if (resultSector.containsAngle(centerOfOriginalGap)) {
|
|
2079
|
+
resultSector.startAngle = thisIntersectionAngleB;
|
|
2080
|
+
resultSector.endAngle = thisIntersectionAngleA;
|
|
2081
|
+
}
|
|
2082
|
+
return resultSector;
|
|
2083
|
+
};
|
|
1969
2084
|
/**
|
|
1970
2085
|
* This function should invalidate any installed listeners and invalidate this object.
|
|
1971
2086
|
* After calling this function the object might not hold valid data any more and
|
|
1972
2087
|
* should not be used.
|
|
2088
|
+
*
|
|
2089
|
+
* @method destroy
|
|
2090
|
+
* @instance
|
|
2091
|
+
* @memberof CircleSector
|
|
2092
|
+
* @return {void}
|
|
1973
2093
|
*/
|
|
1974
2094
|
CircleSector.prototype.destroy = function () {
|
|
1975
2095
|
this.circle.destroy();
|
|
@@ -2037,7 +2157,7 @@ exports.CircleSector = CircleSector;
|
|
|
2037
2157
|
|
|
2038
2158
|
/***/ }),
|
|
2039
2159
|
|
|
2040
|
-
/***/
|
|
2160
|
+
/***/ 973:
|
|
2041
2161
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2042
2162
|
|
|
2043
2163
|
|
|
@@ -2073,10 +2193,10 @@ exports.CircleSector = CircleSector;
|
|
|
2073
2193
|
**/
|
|
2074
2194
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2075
2195
|
exports.CubicBezierCurve = void 0;
|
|
2076
|
-
var Bounds_1 = __webpack_require__(
|
|
2077
|
-
var UIDGenerator_1 = __webpack_require__(
|
|
2078
|
-
var Vertex_1 = __webpack_require__(
|
|
2079
|
-
var Vector_1 = __webpack_require__(
|
|
2196
|
+
var Bounds_1 = __webpack_require__(76);
|
|
2197
|
+
var UIDGenerator_1 = __webpack_require__(938);
|
|
2198
|
+
var Vertex_1 = __webpack_require__(787);
|
|
2199
|
+
var Vector_1 = __webpack_require__(30);
|
|
2080
2200
|
/**
|
|
2081
2201
|
* @classdesc A refactored cubic bezier curve class.
|
|
2082
2202
|
*
|
|
@@ -2152,7 +2272,7 @@ var CubicBezierCurve = /** @class */ (function () {
|
|
|
2152
2272
|
this.getEndControlPoint().add(moveAmount);
|
|
2153
2273
|
}
|
|
2154
2274
|
else {
|
|
2155
|
-
console.log("[CubicBezierCurve.moveCurvePoint] pointID '"
|
|
2275
|
+
console.log("[CubicBezierCurve.moveCurvePoint] pointID '".concat(pointID, "' invalid."));
|
|
2156
2276
|
}
|
|
2157
2277
|
if (updateArcLengths)
|
|
2158
2278
|
this.updateArcLengths();
|
|
@@ -2393,7 +2513,7 @@ var CubicBezierCurve = /** @class */ (function () {
|
|
|
2393
2513
|
return this.startControlPoint;
|
|
2394
2514
|
if (id == this.END_CONTROL_POINT)
|
|
2395
2515
|
return this.endControlPoint;
|
|
2396
|
-
throw new Error("Invalid point ID '"
|
|
2516
|
+
throw new Error("Invalid point ID '".concat(id, "'."));
|
|
2397
2517
|
};
|
|
2398
2518
|
/**
|
|
2399
2519
|
* Get the curve point at a given position t, where t is in [0,1].<br>
|
|
@@ -2857,7 +2977,7 @@ exports.CubicBezierCurve = CubicBezierCurve;
|
|
|
2857
2977
|
|
|
2858
2978
|
/***/ }),
|
|
2859
2979
|
|
|
2860
|
-
/***/
|
|
2980
|
+
/***/ 289:
|
|
2861
2981
|
/***/ ((__unused_webpack_module, exports) => {
|
|
2862
2982
|
|
|
2863
2983
|
|
|
@@ -2953,7 +3073,7 @@ exports.Grid = Grid;
|
|
|
2953
3073
|
|
|
2954
3074
|
/***/ }),
|
|
2955
3075
|
|
|
2956
|
-
/***/
|
|
3076
|
+
/***/ 531:
|
|
2957
3077
|
/***/ ((__unused_webpack_module, exports) => {
|
|
2958
3078
|
|
|
2959
3079
|
|
|
@@ -3196,7 +3316,7 @@ var KeyHandler = /** @class */ (function () {
|
|
|
3196
3316
|
*/
|
|
3197
3317
|
// prettier-ignore
|
|
3198
3318
|
KeyHandler.KEY_CODES = {
|
|
3199
|
-
'break': 3,
|
|
3319
|
+
'break': 3, // alternate: 19
|
|
3200
3320
|
'backspace': 8,
|
|
3201
3321
|
// 'delete' : 8, // alternate: 46
|
|
3202
3322
|
'tab': 9,
|
|
@@ -3212,12 +3332,12 @@ var KeyHandler = /** @class */ (function () {
|
|
|
3212
3332
|
'hanja': 25,
|
|
3213
3333
|
'escape': 27,
|
|
3214
3334
|
'conversion': 28,
|
|
3215
|
-
'non-conversion': 29,
|
|
3335
|
+
'non-conversion': 29, // alternate: 235?
|
|
3216
3336
|
'spacebar': 32,
|
|
3217
3337
|
'pageup': 33,
|
|
3218
3338
|
'pagedown': 34,
|
|
3219
3339
|
'end': 35,
|
|
3220
|
-
'home': 36,
|
|
3340
|
+
'home': 36, // alternate: 172?
|
|
3221
3341
|
'leftarrow': 37,
|
|
3222
3342
|
'uparrow': 38,
|
|
3223
3343
|
'rightarrow': 39,
|
|
@@ -3227,7 +3347,7 @@ var KeyHandler = /** @class */ (function () {
|
|
|
3227
3347
|
'execute': 43,
|
|
3228
3348
|
'printscreen': 44,
|
|
3229
3349
|
'insert': 45,
|
|
3230
|
-
'delete': 46,
|
|
3350
|
+
'delete': 46, // alternate: 8
|
|
3231
3351
|
'help': 47,
|
|
3232
3352
|
'0': 48,
|
|
3233
3353
|
'1': 49,
|
|
@@ -3273,11 +3393,11 @@ var KeyHandler = /** @class */ (function () {
|
|
|
3273
3393
|
'y': 89,
|
|
3274
3394
|
'z': 90,
|
|
3275
3395
|
'windows': 91,
|
|
3276
|
-
'leftcommand': 91,
|
|
3396
|
+
'leftcommand': 91, // left ⌘
|
|
3277
3397
|
'chromebooksearch': 91,
|
|
3278
3398
|
'rightwindowkey': 92,
|
|
3279
3399
|
'windowsmenu': 93,
|
|
3280
|
-
'rightcommant': 93,
|
|
3400
|
+
'rightcommant': 93, // right ⌘
|
|
3281
3401
|
'sleep': 95,
|
|
3282
3402
|
'numpad0': 96,
|
|
3283
3403
|
'numpad1': 97,
|
|
@@ -3291,7 +3411,7 @@ var KeyHandler = /** @class */ (function () {
|
|
|
3291
3411
|
'numpad9': 105,
|
|
3292
3412
|
'multiply': 106,
|
|
3293
3413
|
'add': 107,
|
|
3294
|
-
'numpadperiod': 108,
|
|
3414
|
+
'numpadperiod': 108, // firefox, 194 on chrome
|
|
3295
3415
|
'subtract': 109,
|
|
3296
3416
|
'decimalpoint': 110,
|
|
3297
3417
|
'divide': 111,
|
|
@@ -3330,11 +3450,11 @@ var KeyHandler = /** @class */ (function () {
|
|
|
3330
3450
|
'pagebackward': 166,
|
|
3331
3451
|
'pageforward': 167,
|
|
3332
3452
|
'refresh': 168,
|
|
3333
|
-
'closingparen': 169,
|
|
3453
|
+
'closingparen': 169, // (AZERTY)
|
|
3334
3454
|
'*': 170,
|
|
3335
3455
|
'~+*': 171,
|
|
3336
3456
|
// 'home' : 172,
|
|
3337
|
-
'minus': 173,
|
|
3457
|
+
'minus': 173, // firefox
|
|
3338
3458
|
// 'mute' : 173,
|
|
3339
3459
|
// 'unmute' : 173,
|
|
3340
3460
|
'decreasevolumelevel': 174,
|
|
@@ -3344,8 +3464,8 @@ var KeyHandler = /** @class */ (function () {
|
|
|
3344
3464
|
'stop': 178,
|
|
3345
3465
|
'play/pause': 179,
|
|
3346
3466
|
'email': 180,
|
|
3347
|
-
'mute': 181,
|
|
3348
|
-
'unmute': 181,
|
|
3467
|
+
'mute': 181, // firefox, alternate: 173
|
|
3468
|
+
'unmute': 181, // alternate: 173?
|
|
3349
3469
|
//'decreasevolumelevel' 182 // firefox
|
|
3350
3470
|
//'increasevolumelevel' 183 // firefox
|
|
3351
3471
|
'semicolon': 186,
|
|
@@ -3355,7 +3475,7 @@ var KeyHandler = /** @class */ (function () {
|
|
|
3355
3475
|
'dash': 189,
|
|
3356
3476
|
'period': 190,
|
|
3357
3477
|
'forwardslash': 191,
|
|
3358
|
-
'ç': 191,
|
|
3478
|
+
'ç': 191, // 231 alternate?
|
|
3359
3479
|
'grave accent': 192,
|
|
3360
3480
|
//'ñ' 192,
|
|
3361
3481
|
'æ': 192,
|
|
@@ -3384,7 +3504,7 @@ var KeyHandler = /** @class */ (function () {
|
|
|
3384
3504
|
'half-width': 243,
|
|
3385
3505
|
'full-width': 243,
|
|
3386
3506
|
'kanji': 244,
|
|
3387
|
-
'unlocktrackpad': 251,
|
|
3507
|
+
'unlocktrackpad': 251, // Chrome/Edge
|
|
3388
3508
|
'toggletouchpad': 255
|
|
3389
3509
|
};
|
|
3390
3510
|
return KeyHandler;
|
|
@@ -3394,7 +3514,7 @@ exports.KeyHandler = KeyHandler;
|
|
|
3394
3514
|
|
|
3395
3515
|
/***/ }),
|
|
3396
3516
|
|
|
3397
|
-
/***/
|
|
3517
|
+
/***/ 939:
|
|
3398
3518
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
3399
3519
|
|
|
3400
3520
|
|
|
@@ -3429,6 +3549,8 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3429
3549
|
return extendStatics(d, b);
|
|
3430
3550
|
};
|
|
3431
3551
|
return function (d, b) {
|
|
3552
|
+
if (typeof b !== "function" && b !== null)
|
|
3553
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
3432
3554
|
extendStatics(d, b);
|
|
3433
3555
|
function __() { this.constructor = d; }
|
|
3434
3556
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -3436,8 +3558,8 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3436
3558
|
})();
|
|
3437
3559
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3438
3560
|
exports.Line = void 0;
|
|
3439
|
-
var VertTuple_1 = __webpack_require__(
|
|
3440
|
-
var Vertex_1 = __webpack_require__(
|
|
3561
|
+
var VertTuple_1 = __webpack_require__(590);
|
|
3562
|
+
var Vertex_1 = __webpack_require__(787);
|
|
3441
3563
|
/**
|
|
3442
3564
|
* @classdesc A line consists of two vertices a and b.<br>
|
|
3443
3565
|
* <br>
|
|
@@ -3555,7 +3677,7 @@ exports.Line = Line;
|
|
|
3555
3677
|
|
|
3556
3678
|
/***/ }),
|
|
3557
3679
|
|
|
3558
|
-
/***/
|
|
3680
|
+
/***/ 912:
|
|
3559
3681
|
/***/ (function(__unused_webpack_module, exports) {
|
|
3560
3682
|
|
|
3561
3683
|
|
|
@@ -3592,6 +3714,8 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3592
3714
|
return extendStatics(d, b);
|
|
3593
3715
|
};
|
|
3594
3716
|
return function (d, b) {
|
|
3717
|
+
if (typeof b !== "function" && b !== null)
|
|
3718
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
3595
3719
|
extendStatics(d, b);
|
|
3596
3720
|
function __() { this.constructor = d; }
|
|
3597
3721
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -3779,10 +3903,10 @@ var MouseHandler = /** @class */ (function () {
|
|
|
3779
3903
|
name: eventName,
|
|
3780
3904
|
isTouchEvent: false,
|
|
3781
3905
|
pos: rel,
|
|
3782
|
-
button: event.button,
|
|
3783
|
-
leftButton: event.button === 0,
|
|
3784
|
-
middleButton: event.button === 1,
|
|
3785
|
-
rightButton: event.button === 2,
|
|
3906
|
+
button: event.button, // this.mouseButton,
|
|
3907
|
+
leftButton: event.button === 0, // this.mouseButton === 0,
|
|
3908
|
+
middleButton: event.button === 1, // this.mouseButton === 1,
|
|
3909
|
+
rightButton: event.button === 2, // this.mouseButton === 2,
|
|
3786
3910
|
mouseDownPos: (_a = this.mouseDownPos) !== null && _a !== void 0 ? _a : { x: NaN, y: NaN },
|
|
3787
3911
|
draggedFrom: (_b = this.mouseDragPos) !== null && _b !== void 0 ? _b : { x: NaN, y: NaN },
|
|
3788
3912
|
wasDragged: this.mouseDownPos != null && (this.mouseDownPos.x != rel.x || this.mouseDownPos.y != rel.y),
|
|
@@ -3950,7 +4074,7 @@ var MouseHandler = /** @class */ (function () {
|
|
|
3950
4074
|
* @return {void}
|
|
3951
4075
|
*/
|
|
3952
4076
|
MouseHandler.prototype.throwAlreadyInstalled = function (name) {
|
|
3953
|
-
throw "This MouseHandler already has a '"
|
|
4077
|
+
throw "This MouseHandler already has a '".concat(name, "' callback. To keep the code simple there is only room for one.");
|
|
3954
4078
|
};
|
|
3955
4079
|
/**
|
|
3956
4080
|
* Call this when your work is done.
|
|
@@ -3982,7 +4106,7 @@ exports.MouseHandler = MouseHandler;
|
|
|
3982
4106
|
|
|
3983
4107
|
/***/ }),
|
|
3984
4108
|
|
|
3985
|
-
/***/
|
|
4109
|
+
/***/ 862:
|
|
3986
4110
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
3987
4111
|
|
|
3988
4112
|
|
|
@@ -4003,7 +4127,7 @@ exports.MouseHandler = MouseHandler;
|
|
|
4003
4127
|
**/
|
|
4004
4128
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4005
4129
|
exports.PBImage = void 0;
|
|
4006
|
-
var UIDGenerator_1 = __webpack_require__(
|
|
4130
|
+
var UIDGenerator_1 = __webpack_require__(938);
|
|
4007
4131
|
/**
|
|
4008
4132
|
* @classdesc A wrapper for image objects. Has an upper left and a lower right corner point.
|
|
4009
4133
|
*
|
|
@@ -4049,7 +4173,7 @@ exports.PBImage = PBImage;
|
|
|
4049
4173
|
|
|
4050
4174
|
/***/ }),
|
|
4051
4175
|
|
|
4052
|
-
/***/
|
|
4176
|
+
/***/ 628:
|
|
4053
4177
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
4054
4178
|
|
|
4055
4179
|
|
|
@@ -4062,8 +4186,8 @@ exports.PBImage = PBImage;
|
|
|
4062
4186
|
**/
|
|
4063
4187
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4064
4188
|
exports.PBText = void 0;
|
|
4065
|
-
var UIDGenerator_1 = __webpack_require__(
|
|
4066
|
-
var Vertex_1 = __webpack_require__(
|
|
4189
|
+
var UIDGenerator_1 = __webpack_require__(938);
|
|
4190
|
+
var Vertex_1 = __webpack_require__(787);
|
|
4067
4191
|
/**
|
|
4068
4192
|
* @classdesc A simple text element: position, fontSize, fontFamily, color, textAlign, lineHeight and rotation.
|
|
4069
4193
|
*
|
|
@@ -4118,10 +4242,9 @@ exports.PBText = PBText;
|
|
|
4118
4242
|
|
|
4119
4243
|
/***/ }),
|
|
4120
4244
|
|
|
4121
|
-
/***/
|
|
4122
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__)
|
|
4245
|
+
/***/ 559:
|
|
4246
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
4123
4247
|
|
|
4124
|
-
var __webpack_unused_export__;
|
|
4125
4248
|
|
|
4126
4249
|
/**
|
|
4127
4250
|
* @author Ikaros Kappler
|
|
@@ -4214,29 +4337,33 @@ var __webpack_unused_export__;
|
|
|
4214
4337
|
* @fileoverview The main class.
|
|
4215
4338
|
* @public
|
|
4216
4339
|
**/
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
var
|
|
4224
|
-
var
|
|
4225
|
-
var
|
|
4226
|
-
var
|
|
4227
|
-
var
|
|
4228
|
-
var
|
|
4229
|
-
var
|
|
4230
|
-
var
|
|
4231
|
-
var
|
|
4232
|
-
var
|
|
4233
|
-
var
|
|
4234
|
-
var
|
|
4235
|
-
var
|
|
4236
|
-
var
|
|
4237
|
-
var
|
|
4238
|
-
var
|
|
4239
|
-
var
|
|
4340
|
+
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
4341
|
+
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
4342
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
4343
|
+
};
|
|
4344
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4345
|
+
exports.PlotBoilerplate = void 0;
|
|
4346
|
+
var alloyfinger_typescript_1 = __webpack_require__(597);
|
|
4347
|
+
var draw_1 = __webpack_require__(39);
|
|
4348
|
+
var drawgl_1 = __webpack_require__(264);
|
|
4349
|
+
var drawutilssvg_1 = __webpack_require__(378);
|
|
4350
|
+
var BezierPath_1 = __webpack_require__(733);
|
|
4351
|
+
var Bounds_1 = __webpack_require__(76);
|
|
4352
|
+
var Circle_1 = __webpack_require__(118);
|
|
4353
|
+
var CircleSector_1 = __webpack_require__(135);
|
|
4354
|
+
var Grid_1 = __webpack_require__(289);
|
|
4355
|
+
var KeyHandler_1 = __webpack_require__(531);
|
|
4356
|
+
var Line_1 = __webpack_require__(939);
|
|
4357
|
+
var MouseHandler_1 = __webpack_require__(912);
|
|
4358
|
+
var PBImage_1 = __webpack_require__(862);
|
|
4359
|
+
var Polygon_1 = __webpack_require__(687);
|
|
4360
|
+
var Triangle_1 = __webpack_require__(737);
|
|
4361
|
+
var VEllipse_1 = __webpack_require__(881);
|
|
4362
|
+
var VEllipseSector_1 = __webpack_require__(719);
|
|
4363
|
+
var Vector_1 = __webpack_require__(30);
|
|
4364
|
+
var Vertex_1 = __webpack_require__(787);
|
|
4365
|
+
var VertexAttr_1 = __webpack_require__(476);
|
|
4366
|
+
var PBText_1 = __webpack_require__(628);
|
|
4240
4367
|
/**
|
|
4241
4368
|
* @classdesc The main class of the PlotBoilerplate.
|
|
4242
4369
|
*
|
|
@@ -4327,8 +4454,8 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
4327
4454
|
* Note that changes from the postDraw hook might not be visible in the export.
|
|
4328
4455
|
* @param {string=} [config.title=null] - Specify any hover tile here. It will be attached as a `title` attribute to the most elevated element.
|
|
4329
4456
|
*/
|
|
4330
|
-
function PlotBoilerplate(config) {
|
|
4331
|
-
var
|
|
4457
|
+
function PlotBoilerplate(config, drawConfig) {
|
|
4458
|
+
var _b, _c;
|
|
4332
4459
|
/**
|
|
4333
4460
|
* A discrete timestamp to identify single render cycles.
|
|
4334
4461
|
* Note that using system time milliseconds is not a safe way to identify render frames, as on modern powerful machines
|
|
@@ -4402,8 +4529,8 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
4402
4529
|
enableTouch: f.bool(config, "enableTouch", true),
|
|
4403
4530
|
enableKeys: f.bool(config, "enableKeys", true),
|
|
4404
4531
|
enableMouseWheel: f.bool(config, "enableMouseWheel", true),
|
|
4405
|
-
enableZoom: f.bool(config, "enableZoom", true),
|
|
4406
|
-
enablePan: f.bool(config, "enablePan", true),
|
|
4532
|
+
enableZoom: f.bool(config, "enableZoom", true), // default=true
|
|
4533
|
+
enablePan: f.bool(config, "enablePan", true), // default=true
|
|
4407
4534
|
// Experimental (and unfinished)
|
|
4408
4535
|
enableGL: f.bool(config, "enableGL", false)
|
|
4409
4536
|
}; // END confog
|
|
@@ -4505,7 +4632,7 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
4505
4632
|
this.canvasSize = { width: PlotBoilerplate.DEFAULT_CANVAS_WIDTH, height: PlotBoilerplate.DEFAULT_CANVAS_HEIGHT };
|
|
4506
4633
|
var canvasElement = typeof config.canvas === "string" ? document.querySelector(config.canvas) : config.canvas;
|
|
4507
4634
|
if (typeof canvasElement === "undefined") {
|
|
4508
|
-
throw "Cannot initialize PlotBoilerplate with a null canvas (element \""
|
|
4635
|
+
throw "Cannot initialize PlotBoilerplate with a null canvas (element \"".concat(config.canvas, " not found).");
|
|
4509
4636
|
}
|
|
4510
4637
|
// Which renderer to use: Canvas2D, WebGL (experimental) or SVG?
|
|
4511
4638
|
if (canvasElement.tagName.toLowerCase() === "canvas") {
|
|
@@ -4563,8 +4690,8 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
4563
4690
|
if (config.title) {
|
|
4564
4691
|
this.eventCatcher.setAttribute("title", config.title);
|
|
4565
4692
|
}
|
|
4566
|
-
this.draw.scale.set((
|
|
4567
|
-
this.fill.scale.set((
|
|
4693
|
+
this.draw.scale.set((_b = this.config.scaleX) !== null && _b !== void 0 ? _b : 1.0, this.config.scaleY);
|
|
4694
|
+
this.fill.scale.set((_c = this.config.scaleX) !== null && _c !== void 0 ? _c : 1.0, this.config.scaleY);
|
|
4568
4695
|
this.vertices = [];
|
|
4569
4696
|
this.selectPolygon = null;
|
|
4570
4697
|
this.draggedElements = [];
|
|
@@ -4630,8 +4757,9 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
4630
4757
|
var blob = new Blob(['<?xml version="1.0" encoding="utf-8"?>\n' + svgCode], { type: "image/svg;charset=utf-8" });
|
|
4631
4758
|
// See documentation for FileSaver.js for usage.
|
|
4632
4759
|
// https://github.com/eligrey/FileSaver.js
|
|
4633
|
-
if (typeof globalThis["saveAs"] !== "function")
|
|
4760
|
+
if (typeof globalThis["saveAs"] !== "function") {
|
|
4634
4761
|
throw "Cannot save file; did you load the ./utils/savefile helper function and the eligrey/SaveFile library?";
|
|
4762
|
+
}
|
|
4635
4763
|
var _saveAs = globalThis["saveAs"];
|
|
4636
4764
|
_saveAs(blob, "plotboilerplate.svg");
|
|
4637
4765
|
};
|
|
@@ -4702,12 +4830,12 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
4702
4830
|
* @private
|
|
4703
4831
|
**/
|
|
4704
4832
|
PlotBoilerplate.prototype.updateCSSscale = function () {
|
|
4705
|
-
var
|
|
4833
|
+
var _b, _c, _d, _e;
|
|
4706
4834
|
if (this.config.cssUniformScale) {
|
|
4707
|
-
PlotBoilerplate.utils.setCSSscale(this.canvas, (
|
|
4835
|
+
PlotBoilerplate.utils.setCSSscale(this.canvas, (_b = this.config.cssScaleX) !== null && _b !== void 0 ? _b : 1.0, (_c = this.config.cssScaleX) !== null && _c !== void 0 ? _c : 1.0);
|
|
4708
4836
|
}
|
|
4709
4837
|
else {
|
|
4710
|
-
PlotBoilerplate.utils.setCSSscale(this.canvas, (
|
|
4838
|
+
PlotBoilerplate.utils.setCSSscale(this.canvas, (_d = this.config.cssScaleX) !== null && _d !== void 0 ? _d : 1.0, (_e = this.config.cssScaleY) !== null && _e !== void 0 ? _e : 1.0);
|
|
4711
4839
|
}
|
|
4712
4840
|
};
|
|
4713
4841
|
/**
|
|
@@ -4980,8 +5108,8 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
4980
5108
|
* @return The vertex near the given position or undefined if none was found there.
|
|
4981
5109
|
**/
|
|
4982
5110
|
PlotBoilerplate.prototype.getVertexNear = function (pixelPosition, pixelTolerance) {
|
|
4983
|
-
var
|
|
4984
|
-
var p = this.locatePointNear(this.transformMousePosition(pixelPosition.x, pixelPosition.y), pixelTolerance / Math.min((
|
|
5111
|
+
var _b, _c;
|
|
5112
|
+
var p = this.locatePointNear(this.transformMousePosition(pixelPosition.x, pixelPosition.y), pixelTolerance / Math.min((_b = this.config.cssScaleX) !== null && _b !== void 0 ? _b : 1.0, (_c = this.config.cssScaleY) !== null && _c !== void 0 ? _c : 1.0));
|
|
4985
5113
|
if (p && p.typeName == "vertex") {
|
|
4986
5114
|
return this.vertices[p.vindex];
|
|
4987
5115
|
}
|
|
@@ -5099,16 +5227,16 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
5099
5227
|
var curveIndex = 0;
|
|
5100
5228
|
for (var c in d.bezierCurves) {
|
|
5101
5229
|
// Restore these settings again in each loop (will be overwritten)
|
|
5102
|
-
this.draw.setCurrentId(d.uid
|
|
5103
|
-
this.fill.setCurrentId(d.uid
|
|
5230
|
+
this.draw.setCurrentId("".concat(d.uid, "-").concat(curveIndex));
|
|
5231
|
+
this.fill.setCurrentId("".concat(d.uid, "-").concat(curveIndex));
|
|
5104
5232
|
this.draw.setCurrentClassName(d.className);
|
|
5105
5233
|
this.fill.setCurrentClassName(d.className);
|
|
5106
5234
|
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);
|
|
5107
5235
|
if (this.drawConfig.drawBezierHandlePoints && this.drawConfig.drawHandlePoints) {
|
|
5108
5236
|
if (d.bezierCurves[c].startPoint.attr.visible) {
|
|
5109
5237
|
var df = this.drawConfig.bezier.pathVertex.fill ? fill : draw;
|
|
5110
|
-
df.setCurrentId(d.uid
|
|
5111
|
-
df.setCurrentClassName(d.className
|
|
5238
|
+
df.setCurrentId("".concat(d.uid, "_h0"));
|
|
5239
|
+
df.setCurrentClassName("".concat(d.className, "-start-handle"));
|
|
5112
5240
|
if (d.bezierCurves[c].startPoint.attr.bezierAutoAdjust) {
|
|
5113
5241
|
df.squareHandle(d.bezierCurves[c].startPoint, 5, this._handleColor(d.bezierCurves[c].startPoint, this.drawConfig.bezier.pathVertex.color));
|
|
5114
5242
|
}
|
|
@@ -5119,8 +5247,8 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
5119
5247
|
d.bezierCurves[c].startPoint.attr.renderTime = renderTime;
|
|
5120
5248
|
if (d.bezierCurves[c].endPoint.attr.visible) {
|
|
5121
5249
|
var df = this.drawConfig.bezier.pathVertex.fill ? fill : draw;
|
|
5122
|
-
df.setCurrentId(d.uid
|
|
5123
|
-
df.setCurrentClassName(d.className
|
|
5250
|
+
df.setCurrentId("".concat(d.uid, "_h0"));
|
|
5251
|
+
df.setCurrentClassName("".concat(d.className, "-start-handle"));
|
|
5124
5252
|
if (d.bezierCurves[c].endPoint.attr.bezierAutoAdjust) {
|
|
5125
5253
|
df.squareHandle(d.bezierCurves[c].endPoint, 5, this._handleColor(d.bezierCurves[c].endPoint, this.drawConfig.bezier.pathVertex.color));
|
|
5126
5254
|
}
|
|
@@ -5130,14 +5258,14 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
5130
5258
|
}
|
|
5131
5259
|
if (d.bezierCurves[c].startControlPoint.attr.visible) {
|
|
5132
5260
|
var df = this.drawConfig.bezier.controlVertex.fill ? fill : draw;
|
|
5133
|
-
df.setCurrentId(d.uid
|
|
5134
|
-
df.setCurrentClassName(d.className
|
|
5261
|
+
df.setCurrentId("".concat(d.uid, "_h2"));
|
|
5262
|
+
df.setCurrentClassName("".concat(d.className, "-start-control-handle"));
|
|
5135
5263
|
df.circleHandle(d.bezierCurves[c].startControlPoint, 3, this._handleColor(d.bezierCurves[c].startControlPoint, this.drawConfig.bezier.controlVertex.color));
|
|
5136
5264
|
}
|
|
5137
5265
|
if (d.bezierCurves[c].endControlPoint.attr.visible) {
|
|
5138
5266
|
var df = this.drawConfig.bezier.controlVertex.fill ? fill : draw;
|
|
5139
|
-
df.setCurrentId(d.uid
|
|
5140
|
-
df.setCurrentClassName(d.className
|
|
5267
|
+
df.setCurrentId("".concat(d.uid, "_h3"));
|
|
5268
|
+
df.setCurrentClassName("".concat(d.className, "-end-control-handle"));
|
|
5141
5269
|
df.circleHandle(d.bezierCurves[c].endControlPoint, 3, this._handleColor(d.bezierCurves[c].endControlPoint, this.drawConfig.bezier.controlVertex.color));
|
|
5142
5270
|
}
|
|
5143
5271
|
d.bezierCurves[c].startPoint.attr.renderTime = renderTime;
|
|
@@ -5152,11 +5280,11 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
5152
5280
|
d.bezierCurves[c].endControlPoint.attr.renderTime = renderTime;
|
|
5153
5281
|
}
|
|
5154
5282
|
if (this.drawConfig.drawBezierHandleLines && this.drawConfig.drawHandleLines) {
|
|
5155
|
-
draw.setCurrentId(d.uid
|
|
5156
|
-
draw.setCurrentClassName(d.className
|
|
5283
|
+
draw.setCurrentId("".concat(d.uid, "_l0"));
|
|
5284
|
+
draw.setCurrentClassName("".concat(d.className, "-start-line"));
|
|
5157
5285
|
draw.handleLine(d.bezierCurves[c].startPoint, d.bezierCurves[c].startControlPoint);
|
|
5158
|
-
draw.setCurrentId(d.uid
|
|
5159
|
-
draw.setCurrentClassName(d.className
|
|
5286
|
+
draw.setCurrentId("".concat(d.uid, "_l1"));
|
|
5287
|
+
draw.setCurrentClassName("".concat(d.className, "-end-line"));
|
|
5160
5288
|
draw.handleLine(d.bezierCurves[c].endPoint, d.bezierCurves[c].endControlPoint);
|
|
5161
5289
|
}
|
|
5162
5290
|
curveIndex++;
|
|
@@ -5177,17 +5305,17 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
5177
5305
|
}
|
|
5178
5306
|
else if (d instanceof VEllipse_1.VEllipse) {
|
|
5179
5307
|
if (this.drawConfig.drawHandleLines) {
|
|
5180
|
-
draw.setCurrentId(d.uid
|
|
5181
|
-
draw.setCurrentClassName(d.className
|
|
5308
|
+
draw.setCurrentId("".concat(d.uid, "_e0"));
|
|
5309
|
+
draw.setCurrentClassName("".concat(d.className, "-v-line"));
|
|
5182
5310
|
// draw.line( d.center.clone().add(0,d.axis.y-d.center.y), d.axis, '#c8c8c8' );
|
|
5183
5311
|
draw.handleLine(d.center.clone().add(0, d.signedRadiusV()).rotate(d.rotation, d.center), d.axis); // , "#c8c8c8");
|
|
5184
|
-
draw.setCurrentId(d.uid
|
|
5185
|
-
draw.setCurrentClassName(d.className
|
|
5312
|
+
draw.setCurrentId("".concat(d.uid, "_e1"));
|
|
5313
|
+
draw.setCurrentClassName("".concat(d.className, "-h-line"));
|
|
5186
5314
|
// draw.line( d.center.clone().add(d.axis.x-d.center.x,0), d.axis, '#c8c8c8' );
|
|
5187
5315
|
draw.handleLine(d.center.clone().add(d.signedRadiusH(), 0).rotate(d.rotation, d.center), d.axis); // , "#c8c8c8");
|
|
5188
5316
|
}
|
|
5189
5317
|
draw.setCurrentId(d.uid);
|
|
5190
|
-
draw.setCurrentClassName(""
|
|
5318
|
+
draw.setCurrentClassName("".concat(d.className));
|
|
5191
5319
|
draw.ellipse(d.center,
|
|
5192
5320
|
// Math.abs(d.axis.x-d.center.x), Math.abs(d.axis.y-d.center.y),
|
|
5193
5321
|
d.radiusH(), d.radiusV(), this.drawConfig.ellipse.color, this.drawConfig.ellipse.lineWidth, d.rotation);
|
|
@@ -5198,7 +5326,7 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
5198
5326
|
}
|
|
5199
5327
|
else if (d instanceof VEllipseSector_1.VEllipseSector) {
|
|
5200
5328
|
draw.setCurrentId(d.uid);
|
|
5201
|
-
draw.setCurrentClassName(""
|
|
5329
|
+
draw.setCurrentClassName("".concat(d.className));
|
|
5202
5330
|
/* draw.ellipse( d.center,
|
|
5203
5331
|
// Math.abs(d.axis.x-d.center.x), Math.abs(d.axis.y-d.center.y),
|
|
5204
5332
|
d.radiusH(), d.radiusV(),
|
|
@@ -5231,8 +5359,8 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
5231
5359
|
else if (d instanceof Vector_1.Vector) {
|
|
5232
5360
|
draw.arrow(d.a, d.b, this.drawConfig.vector.color);
|
|
5233
5361
|
if (this.drawConfig.drawHandlePoints && d.b.attr.selectable && d.b.attr.visible) {
|
|
5234
|
-
draw.setCurrentId(d.uid
|
|
5235
|
-
draw.setCurrentClassName(d.className
|
|
5362
|
+
draw.setCurrentId("".concat(d.uid, "_h0"));
|
|
5363
|
+
draw.setCurrentClassName("".concat(d.className, "-handle"));
|
|
5236
5364
|
draw.circleHandle(d.b, 3, "#a8a8a8");
|
|
5237
5365
|
}
|
|
5238
5366
|
else {
|
|
@@ -5245,15 +5373,15 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
5245
5373
|
}
|
|
5246
5374
|
else if (d instanceof PBImage_1.PBImage) {
|
|
5247
5375
|
if (this.drawConfig.drawHandleLines) {
|
|
5248
|
-
draw.setCurrentId(d.uid
|
|
5249
|
-
draw.setCurrentClassName(d.className
|
|
5376
|
+
draw.setCurrentId("".concat(d.uid, "_l0"));
|
|
5377
|
+
draw.setCurrentClassName("".concat(d.className, "-line"));
|
|
5250
5378
|
draw.line(d.upperLeft, d.lowerRight, this.drawConfig.image.color, this.drawConfig.image.lineWidth);
|
|
5251
5379
|
}
|
|
5252
5380
|
fill.setCurrentId(d.uid);
|
|
5253
5381
|
fill.image(d.image, d.upperLeft, d.lowerRight.clone().sub(d.upperLeft));
|
|
5254
5382
|
if (this.drawConfig.drawHandlePoints) {
|
|
5255
|
-
draw.setCurrentId(d.uid
|
|
5256
|
-
draw.setCurrentClassName(d.className
|
|
5383
|
+
draw.setCurrentId("".concat(d.uid, "_h0"));
|
|
5384
|
+
draw.setCurrentClassName("".concat(d.className, "-lower-right"));
|
|
5257
5385
|
draw.circleHandle(d.lowerRight, 3, this.drawConfig.image.color);
|
|
5258
5386
|
d.lowerRight.attr.renderTime = renderTime;
|
|
5259
5387
|
}
|
|
@@ -5262,8 +5390,8 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
5262
5390
|
fill.setCurrentId(d.uid);
|
|
5263
5391
|
fill.text(d.text, d.anchor.x, d.anchor.y, d);
|
|
5264
5392
|
if (this.drawConfig.text.anchor) {
|
|
5265
|
-
draw.setCurrentId(d.uid
|
|
5266
|
-
draw.setCurrentClassName(d.className
|
|
5393
|
+
draw.setCurrentId("".concat(d.uid, "_a0"));
|
|
5394
|
+
draw.setCurrentClassName("".concat(d.className, "-anchor"));
|
|
5267
5395
|
(this.drawConfig.text.fill ? fill : draw).point(d.anchor, this.drawConfig.text.color);
|
|
5268
5396
|
}
|
|
5269
5397
|
d.anchor.attr.renderTime = renderTime;
|
|
@@ -5410,8 +5538,8 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
5410
5538
|
* @return {Bounds} The current viewport.
|
|
5411
5539
|
**/
|
|
5412
5540
|
PlotBoilerplate.prototype.viewport = function () {
|
|
5413
|
-
var
|
|
5414
|
-
return new Bounds_1.Bounds(this.transformMousePosition(0, 0), this.transformMousePosition(this.canvasSize.width * ((
|
|
5541
|
+
var _b, _c;
|
|
5542
|
+
return new Bounds_1.Bounds(this.transformMousePosition(0, 0), this.transformMousePosition(this.canvasSize.width * ((_b = this.config.cssScaleX) !== null && _b !== void 0 ? _b : 1.0), this.canvasSize.height * ((_c = this.config.cssScaleY) !== null && _c !== void 0 ? _c : 1.0)));
|
|
5415
5543
|
};
|
|
5416
5544
|
/**
|
|
5417
5545
|
* Trigger the saveFile.hook.
|
|
@@ -5460,12 +5588,12 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
5460
5588
|
**/
|
|
5461
5589
|
PlotBoilerplate.prototype.resizeCanvas = function () {
|
|
5462
5590
|
var _this = this;
|
|
5463
|
-
var
|
|
5591
|
+
var _b, _c, _d, _e, _f, _g;
|
|
5464
5592
|
var _self = this;
|
|
5465
5593
|
var _setSize = function (w, h) {
|
|
5466
|
-
var
|
|
5467
|
-
w *= (
|
|
5468
|
-
h *= (
|
|
5594
|
+
var _b, _c;
|
|
5595
|
+
w *= (_b = _self.config.canvasWidthFactor) !== null && _b !== void 0 ? _b : 1.0;
|
|
5596
|
+
h *= (_c = _self.config.canvasHeightFactor) !== null && _c !== void 0 ? _c : 1.0;
|
|
5469
5597
|
_self.canvasSize.width = w;
|
|
5470
5598
|
_self.canvasSize.height = h;
|
|
5471
5599
|
if (_self.canvas instanceof HTMLCanvasElement) {
|
|
@@ -5473,12 +5601,12 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
5473
5601
|
_self.canvas.height = h;
|
|
5474
5602
|
}
|
|
5475
5603
|
else if (_self.canvas instanceof SVGElement) {
|
|
5476
|
-
_this.canvas.setAttribute("viewBox", "0 0 "
|
|
5477
|
-
_this.canvas.setAttribute("width", ""
|
|
5478
|
-
_this.canvas.setAttribute("height", ""
|
|
5604
|
+
_this.canvas.setAttribute("viewBox", "0 0 ".concat(w, " ").concat(h));
|
|
5605
|
+
_this.canvas.setAttribute("width", "".concat(w));
|
|
5606
|
+
_this.canvas.setAttribute("height", "".concat(h));
|
|
5479
5607
|
_this.draw.setSize(_self.canvasSize); // No need to set size to this.fill (instance copy)
|
|
5480
|
-
_this.eventCatcher.style.width = w
|
|
5481
|
-
_this.eventCatcher.style.height = h
|
|
5608
|
+
_this.eventCatcher.style.width = "".concat(w, "px");
|
|
5609
|
+
_this.eventCatcher.style.height = "".concat(h, "px");
|
|
5482
5610
|
}
|
|
5483
5611
|
else {
|
|
5484
5612
|
console.error("Error: cannot resize canvas element because it seems neither be a HTMLCanvasElement nor an SVGElement.");
|
|
@@ -5494,8 +5622,8 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
5494
5622
|
var width = globalThis.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
|
5495
5623
|
var height = globalThis.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
|
|
5496
5624
|
_self.canvas.style.position = "absolute";
|
|
5497
|
-
_self.canvas.style.width = ((
|
|
5498
|
-
_self.canvas.style.height = ((
|
|
5625
|
+
_self.canvas.style.width = ((_b = _self.config.canvasWidthFactor) !== null && _b !== void 0 ? _b : 1.0) * width + "px";
|
|
5626
|
+
_self.canvas.style.height = ((_c = _self.config.canvasWidthFactor) !== null && _c !== void 0 ? _c : 1.0) * height + "px";
|
|
5499
5627
|
_self.canvas.style.top = "0px";
|
|
5500
5628
|
_self.canvas.style.left = "0px";
|
|
5501
5629
|
_setSize(width, height);
|
|
@@ -5504,8 +5632,8 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
5504
5632
|
// Set editor size
|
|
5505
5633
|
_self.canvas.style.position = "static";
|
|
5506
5634
|
var space = this.getAvailableContainerSpace();
|
|
5507
|
-
_self.canvas.style.width = ((
|
|
5508
|
-
_self.canvas.style.height = ((
|
|
5635
|
+
_self.canvas.style.width = ((_d = _self.config.canvasWidthFactor) !== null && _d !== void 0 ? _d : 1.0) * space.width + "px";
|
|
5636
|
+
_self.canvas.style.height = ((_e = _self.config.canvasHeightFactor) !== null && _e !== void 0 ? _e : 1.0) * space.height + "px";
|
|
5509
5637
|
_self.canvas.style.top = "";
|
|
5510
5638
|
_self.canvas.style.left = "";
|
|
5511
5639
|
_setSize(space.width, space.height);
|
|
@@ -5513,7 +5641,7 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
5513
5641
|
else {
|
|
5514
5642
|
_self.canvas.style.width = "";
|
|
5515
5643
|
_self.canvas.style.height = "";
|
|
5516
|
-
_setSize((
|
|
5644
|
+
_setSize((_f = _self.config.defaultCanvasWidth) !== null && _f !== void 0 ? _f : 1024, (_g = _self.config.defaultCanvasHeight) !== null && _g !== void 0 ? _g : 768);
|
|
5517
5645
|
}
|
|
5518
5646
|
if (_self.config.redrawOnResize)
|
|
5519
5647
|
_self.redraw();
|
|
@@ -6017,7 +6145,9 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
6017
6145
|
}
|
|
6018
6146
|
}; // END afProps
|
|
6019
6147
|
if (window["createAlloyFinger"]) {
|
|
6020
|
-
window["createAlloyFinger"](this.eventCatcher ? this.eventCatcher : this.canvas, afProps);
|
|
6148
|
+
// window["createAlloyFinger"](this.eventCatcher ? this.eventCatcher : this.canvas, afProps);
|
|
6149
|
+
var createAlloyFinger = window["createAlloyFinger"];
|
|
6150
|
+
createAlloyFinger(this.eventCatcher ? this.eventCatcher : this.canvas, afProps);
|
|
6021
6151
|
}
|
|
6022
6152
|
else {
|
|
6023
6153
|
/* tslint:disable-next-line */
|
|
@@ -6075,10 +6205,15 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
6075
6205
|
PlotBoilerplate.prototype.createGUI = function (props) {
|
|
6076
6206
|
// This function moved to the helper utils.
|
|
6077
6207
|
// We do not want to include the whole dat.GUI package.
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6208
|
+
var utils = globalThis["utils"];
|
|
6209
|
+
// if (globalThis["utils"] && typeof globalThis["utils"].createGUI == "function") {
|
|
6210
|
+
// return (globalThis["utils" as keyof Object] as any as ({createGUI : (pb:PlotBoilerplate,props:DatGuiProps|undefined)=>GUI })).createGUI(this, props);
|
|
6211
|
+
if (utils && typeof utils.createGUI === "function") {
|
|
6212
|
+
return utils.createGUI(this, props);
|
|
6213
|
+
}
|
|
6214
|
+
else {
|
|
6081
6215
|
throw "Cannot create dat.GUI instance; did you load the ./utils/creategui helper function an the dat.GUI library?";
|
|
6216
|
+
}
|
|
6082
6217
|
};
|
|
6083
6218
|
var _a;
|
|
6084
6219
|
/** @constant {number} */
|
|
@@ -6107,6 +6242,7 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
6107
6242
|
};
|
|
6108
6243
|
return class_1;
|
|
6109
6244
|
}()),
|
|
6245
|
+
__setFunctionName(_a, "Draggable"),
|
|
6110
6246
|
_a.VERTEX = "vertex",
|
|
6111
6247
|
_a);
|
|
6112
6248
|
/**
|
|
@@ -6196,7 +6332,8 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
6196
6332
|
* @return {void}
|
|
6197
6333
|
**/
|
|
6198
6334
|
setCSSscale: function (element, scaleX, scaleY) {
|
|
6199
|
-
element.style["transform-origin"] = "0 0";
|
|
6335
|
+
// element.style["transform-origin"] = "0 0";
|
|
6336
|
+
element.style.transformOrigin = "0 0";
|
|
6200
6337
|
if (scaleX == 1.0 && scaleY == 1.0) {
|
|
6201
6338
|
// element.style.transform = null;
|
|
6202
6339
|
element.style.removeProperty("transform");
|
|
@@ -6279,7 +6416,7 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
6279
6416
|
return fallback;
|
|
6280
6417
|
return obj[key];
|
|
6281
6418
|
}
|
|
6282
|
-
},
|
|
6419
|
+
}, // END fetch
|
|
6283
6420
|
/**
|
|
6284
6421
|
* Installs vertex listeners to the path's vertices so that controlpoints
|
|
6285
6422
|
* move with their path points when dragged.
|
|
@@ -6332,13 +6469,13 @@ var PlotBoilerplate = /** @class */ (function () {
|
|
|
6332
6469
|
}; // END utils
|
|
6333
6470
|
return PlotBoilerplate;
|
|
6334
6471
|
}()); // END class PlotBoilerplate
|
|
6335
|
-
exports.
|
|
6336
|
-
|
|
6472
|
+
exports.PlotBoilerplate = PlotBoilerplate;
|
|
6473
|
+
exports["default"] = PlotBoilerplate;
|
|
6337
6474
|
//# sourceMappingURL=PlotBoilerplate.js.map
|
|
6338
6475
|
|
|
6339
6476
|
/***/ }),
|
|
6340
6477
|
|
|
6341
|
-
/***/
|
|
6478
|
+
/***/ 687:
|
|
6342
6479
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
6343
6480
|
|
|
6344
6481
|
|
|
@@ -6379,11 +6516,11 @@ __webpack_unused_export__ = PlotBoilerplate;
|
|
|
6379
6516
|
**/
|
|
6380
6517
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6381
6518
|
exports.Polygon = void 0;
|
|
6382
|
-
var BezierPath_1 = __webpack_require__(
|
|
6383
|
-
var Bounds_1 = __webpack_require__(
|
|
6384
|
-
var Line_1 = __webpack_require__(
|
|
6385
|
-
var UIDGenerator_1 = __webpack_require__(
|
|
6386
|
-
var Vertex_1 = __webpack_require__(
|
|
6519
|
+
var BezierPath_1 = __webpack_require__(733);
|
|
6520
|
+
var Bounds_1 = __webpack_require__(76);
|
|
6521
|
+
var Line_1 = __webpack_require__(939);
|
|
6522
|
+
var UIDGenerator_1 = __webpack_require__(938);
|
|
6523
|
+
var Vertex_1 = __webpack_require__(787);
|
|
6387
6524
|
/**
|
|
6388
6525
|
* @classdesc A polygon class. Any polygon consists of an array of vertices; polygons can be open or closed.
|
|
6389
6526
|
*
|
|
@@ -6950,7 +7087,7 @@ exports.Polygon = Polygon;
|
|
|
6950
7087
|
|
|
6951
7088
|
/***/ }),
|
|
6952
7089
|
|
|
6953
|
-
/***/
|
|
7090
|
+
/***/ 737:
|
|
6954
7091
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
6955
7092
|
|
|
6956
7093
|
|
|
@@ -6985,13 +7122,13 @@ exports.Polygon = Polygon;
|
|
|
6985
7122
|
**/
|
|
6986
7123
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6987
7124
|
exports.Triangle = void 0;
|
|
6988
|
-
var Bounds_1 = __webpack_require__(
|
|
6989
|
-
var Circle_1 = __webpack_require__(
|
|
6990
|
-
var Line_1 = __webpack_require__(
|
|
6991
|
-
var Polygon_1 = __webpack_require__(
|
|
6992
|
-
var UIDGenerator_1 = __webpack_require__(
|
|
6993
|
-
var Vertex_1 = __webpack_require__(
|
|
6994
|
-
var geomutils_1 = __webpack_require__(
|
|
7125
|
+
var Bounds_1 = __webpack_require__(76);
|
|
7126
|
+
var Circle_1 = __webpack_require__(118);
|
|
7127
|
+
var Line_1 = __webpack_require__(939);
|
|
7128
|
+
var Polygon_1 = __webpack_require__(687);
|
|
7129
|
+
var UIDGenerator_1 = __webpack_require__(938);
|
|
7130
|
+
var Vertex_1 = __webpack_require__(787);
|
|
7131
|
+
var geomutils_1 = __webpack_require__(328);
|
|
6995
7132
|
/**
|
|
6996
7133
|
* @classdesc A triangle class for triangulations.
|
|
6997
7134
|
*
|
|
@@ -7044,7 +7181,7 @@ var Triangle = /** @class */ (function () {
|
|
|
7044
7181
|
**/
|
|
7045
7182
|
Triangle.fromArray = function (arr) {
|
|
7046
7183
|
if (arr.length < 3)
|
|
7047
|
-
throw "Cannot create triangle from array with less than three vertices ("
|
|
7184
|
+
throw "Cannot create triangle from array with less than three vertices (".concat(arr.length, ")");
|
|
7048
7185
|
return new Triangle(arr[0], arr[1], arr[2]);
|
|
7049
7186
|
};
|
|
7050
7187
|
/**
|
|
@@ -7361,7 +7498,7 @@ exports.Triangle = Triangle;
|
|
|
7361
7498
|
|
|
7362
7499
|
/***/ }),
|
|
7363
7500
|
|
|
7364
|
-
/***/
|
|
7501
|
+
/***/ 938:
|
|
7365
7502
|
/***/ ((__unused_webpack_module, exports) => {
|
|
7366
7503
|
|
|
7367
7504
|
|
|
@@ -7378,7 +7515,7 @@ var UIDGenerator = /** @class */ (function () {
|
|
|
7378
7515
|
function UIDGenerator() {
|
|
7379
7516
|
}
|
|
7380
7517
|
UIDGenerator.next = function () {
|
|
7381
|
-
return ""
|
|
7518
|
+
return "".concat(UIDGenerator.current++);
|
|
7382
7519
|
};
|
|
7383
7520
|
UIDGenerator.current = 0;
|
|
7384
7521
|
return UIDGenerator;
|
|
@@ -7388,7 +7525,7 @@ exports.UIDGenerator = UIDGenerator;
|
|
|
7388
7525
|
|
|
7389
7526
|
/***/ }),
|
|
7390
7527
|
|
|
7391
|
-
/***/
|
|
7528
|
+
/***/ 881:
|
|
7392
7529
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7393
7530
|
|
|
7394
7531
|
|
|
@@ -7416,11 +7553,11 @@ exports.UIDGenerator = UIDGenerator;
|
|
|
7416
7553
|
**/
|
|
7417
7554
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7418
7555
|
exports.VEllipse = void 0;
|
|
7419
|
-
var Line_1 = __webpack_require__(
|
|
7420
|
-
var Vector_1 = __webpack_require__(
|
|
7421
|
-
var Vertex_1 = __webpack_require__(
|
|
7422
|
-
var UIDGenerator_1 = __webpack_require__(
|
|
7423
|
-
var CubicBezierCurve_1 = __webpack_require__(
|
|
7556
|
+
var Line_1 = __webpack_require__(939);
|
|
7557
|
+
var Vector_1 = __webpack_require__(30);
|
|
7558
|
+
var Vertex_1 = __webpack_require__(787);
|
|
7559
|
+
var UIDGenerator_1 = __webpack_require__(938);
|
|
7560
|
+
var CubicBezierCurve_1 = __webpack_require__(973);
|
|
7424
7561
|
/**
|
|
7425
7562
|
* @classdesc An ellipse class based on two vertices [centerX,centerY] and [radiusX,radiusY].
|
|
7426
7563
|
*
|
|
@@ -7808,7 +7945,7 @@ exports.VEllipse = VEllipse;
|
|
|
7808
7945
|
|
|
7809
7946
|
/***/ }),
|
|
7810
7947
|
|
|
7811
|
-
/***/
|
|
7948
|
+
/***/ 719:
|
|
7812
7949
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7813
7950
|
|
|
7814
7951
|
|
|
@@ -7824,12 +7961,12 @@ exports.VEllipse = VEllipse;
|
|
|
7824
7961
|
*/
|
|
7825
7962
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7826
7963
|
exports.VEllipseSector = void 0;
|
|
7827
|
-
var CubicBezierCurve_1 = __webpack_require__(
|
|
7828
|
-
var geomutils_1 = __webpack_require__(
|
|
7829
|
-
var Line_1 = __webpack_require__(
|
|
7830
|
-
var UIDGenerator_1 = __webpack_require__(
|
|
7831
|
-
var VEllipse_1 = __webpack_require__(
|
|
7832
|
-
var Vertex_1 = __webpack_require__(
|
|
7964
|
+
var CubicBezierCurve_1 = __webpack_require__(973);
|
|
7965
|
+
var geomutils_1 = __webpack_require__(328);
|
|
7966
|
+
var Line_1 = __webpack_require__(939);
|
|
7967
|
+
var UIDGenerator_1 = __webpack_require__(938);
|
|
7968
|
+
var VEllipse_1 = __webpack_require__(881);
|
|
7969
|
+
var Vertex_1 = __webpack_require__(787);
|
|
7833
7970
|
/**
|
|
7834
7971
|
* @classdesc A class for elliptic sectors.
|
|
7835
7972
|
*
|
|
@@ -7971,7 +8108,7 @@ var VEllipseSector = /** @class */ (function () {
|
|
|
7971
8108
|
var r2d = 180 / Math.PI;
|
|
7972
8109
|
pathData.push("A", radiusH, radiusV, rotation * r2d, largeArcFlag, sweepFlag, end.x, end.y);
|
|
7973
8110
|
return pathData;
|
|
7974
|
-
},
|
|
8111
|
+
}, // END function describeSVGArc
|
|
7975
8112
|
/**
|
|
7976
8113
|
* Helper function to find second-kind elliptic angles, so that the euclidean distance along the the
|
|
7977
8114
|
* elliptic sector is the same for all.
|
|
@@ -8098,7 +8235,7 @@ exports.VEllipseSector = VEllipseSector;
|
|
|
8098
8235
|
|
|
8099
8236
|
/***/ }),
|
|
8100
8237
|
|
|
8101
|
-
/***/
|
|
8238
|
+
/***/ 30:
|
|
8102
8239
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
8103
8240
|
|
|
8104
8241
|
|
|
@@ -8129,6 +8266,8 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
8129
8266
|
return extendStatics(d, b);
|
|
8130
8267
|
};
|
|
8131
8268
|
return function (d, b) {
|
|
8269
|
+
if (typeof b !== "function" && b !== null)
|
|
8270
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
8132
8271
|
extendStatics(d, b);
|
|
8133
8272
|
function __() { this.constructor = d; }
|
|
8134
8273
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -8136,8 +8275,8 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
8136
8275
|
})();
|
|
8137
8276
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8138
8277
|
exports.Vector = void 0;
|
|
8139
|
-
var VertTuple_1 = __webpack_require__(
|
|
8140
|
-
var Vertex_1 = __webpack_require__(
|
|
8278
|
+
var VertTuple_1 = __webpack_require__(590);
|
|
8279
|
+
var Vertex_1 = __webpack_require__(787);
|
|
8141
8280
|
/**
|
|
8142
8281
|
* @classdesc A vector (Vertex,Vertex) is a line with a visible direction.<br>
|
|
8143
8282
|
* <br>
|
|
@@ -8288,7 +8427,7 @@ exports.Vector = Vector;
|
|
|
8288
8427
|
|
|
8289
8428
|
/***/ }),
|
|
8290
8429
|
|
|
8291
|
-
/***/
|
|
8430
|
+
/***/ 590:
|
|
8292
8431
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
8293
8432
|
|
|
8294
8433
|
|
|
@@ -8308,8 +8447,8 @@ exports.Vector = Vector;
|
|
|
8308
8447
|
*/
|
|
8309
8448
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8310
8449
|
exports.VertTuple = void 0;
|
|
8311
|
-
var Vertex_1 = __webpack_require__(
|
|
8312
|
-
var UIDGenerator_1 = __webpack_require__(
|
|
8450
|
+
var Vertex_1 = __webpack_require__(787);
|
|
8451
|
+
var UIDGenerator_1 = __webpack_require__(938);
|
|
8313
8452
|
/**
|
|
8314
8453
|
* @classdesc An abstract base classes for vertex tuple constructs, like Lines or Vectors.
|
|
8315
8454
|
* @abstract
|
|
@@ -8604,7 +8743,7 @@ exports.VertTuple = VertTuple;
|
|
|
8604
8743
|
|
|
8605
8744
|
/***/ }),
|
|
8606
8745
|
|
|
8607
|
-
/***/
|
|
8746
|
+
/***/ 787:
|
|
8608
8747
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
8609
8748
|
|
|
8610
8749
|
|
|
@@ -8641,16 +8780,17 @@ exports.VertTuple = VertTuple;
|
|
|
8641
8780
|
* @modified 2022-11-28 Added the `subXY`, `subX` and `subY` methods to the `Vertex` class.
|
|
8642
8781
|
* @modified 2023-09-29 Downgraded types for the `Vertex.utils.buildArrowHead` function (replacing Vertex params by more generic XYCoords type).
|
|
8643
8782
|
* @modified 2023-09-29 Added the `Vertex.abs()` method as it seems useful.
|
|
8644
|
-
* @
|
|
8783
|
+
* @modified 2024-03-08 Added the optional `precision` param to the `toString` method.
|
|
8784
|
+
* @version 2.9.0
|
|
8645
8785
|
*
|
|
8646
8786
|
* @file Vertex
|
|
8647
8787
|
* @public
|
|
8648
8788
|
**/
|
|
8649
8789
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8650
8790
|
exports.Vertex = void 0;
|
|
8651
|
-
var VertexAttr_1 = __webpack_require__(
|
|
8652
|
-
var UIDGenerator_1 = __webpack_require__(
|
|
8653
|
-
var VertexListeners_1 = __webpack_require__(
|
|
8791
|
+
var VertexAttr_1 = __webpack_require__(476);
|
|
8792
|
+
var UIDGenerator_1 = __webpack_require__(938);
|
|
8793
|
+
var VertexListeners_1 = __webpack_require__(934);
|
|
8654
8794
|
/**
|
|
8655
8795
|
* @classdesc A vertex is a pair of two numbers.<br>
|
|
8656
8796
|
* <br>
|
|
@@ -8828,11 +8968,11 @@ var Vertex = /** @class */ (function () {
|
|
|
8828
8968
|
if (typeof x == "number")
|
|
8829
8969
|
this.x += x;
|
|
8830
8970
|
else
|
|
8831
|
-
throw "Cannot add "
|
|
8971
|
+
throw "Cannot add ".concat(typeof x, " to numeric x component!");
|
|
8832
8972
|
if (typeof y == "number")
|
|
8833
8973
|
this.y += y;
|
|
8834
8974
|
else
|
|
8835
|
-
throw "Cannot add "
|
|
8975
|
+
throw "Cannot add ".concat(typeof y, " to numeric y component!");
|
|
8836
8976
|
}
|
|
8837
8977
|
}
|
|
8838
8978
|
return this;
|
|
@@ -8906,11 +9046,11 @@ var Vertex = /** @class */ (function () {
|
|
|
8906
9046
|
if (typeof x == "number")
|
|
8907
9047
|
this.x -= x;
|
|
8908
9048
|
else
|
|
8909
|
-
throw "Cannot add "
|
|
9049
|
+
throw "Cannot add ".concat(typeof x, " to numeric x component!");
|
|
8910
9050
|
if (typeof y == "number")
|
|
8911
9051
|
this.y -= y;
|
|
8912
9052
|
else
|
|
8913
|
-
throw "Cannot add "
|
|
9053
|
+
throw "Cannot add ".concat(typeof y, " to numeric y component!");
|
|
8914
9054
|
}
|
|
8915
9055
|
}
|
|
8916
9056
|
return this;
|
|
@@ -9183,8 +9323,13 @@ var Vertex = /** @class */ (function () {
|
|
|
9183
9323
|
* @instance
|
|
9184
9324
|
* @memberof Vertex
|
|
9185
9325
|
**/
|
|
9186
|
-
Vertex.prototype.toString = function () {
|
|
9187
|
-
|
|
9326
|
+
Vertex.prototype.toString = function (precision) {
|
|
9327
|
+
if (typeof precision === "undefined") {
|
|
9328
|
+
return "(" + this.x + "," + this.y + ")";
|
|
9329
|
+
}
|
|
9330
|
+
else {
|
|
9331
|
+
return "(" + this.x.toFixed(precision) + "," + this.y.toFixed(precision) + ")";
|
|
9332
|
+
}
|
|
9188
9333
|
};
|
|
9189
9334
|
/**
|
|
9190
9335
|
* This function should invalidate any installed listeners and invalidate this object.
|
|
@@ -9270,7 +9415,7 @@ exports.Vertex = Vertex;
|
|
|
9270
9415
|
|
|
9271
9416
|
/***/ }),
|
|
9272
9417
|
|
|
9273
|
-
/***/
|
|
9418
|
+
/***/ 476:
|
|
9274
9419
|
/***/ ((__unused_webpack_module, exports) => {
|
|
9275
9420
|
|
|
9276
9421
|
|
|
@@ -9282,7 +9427,8 @@ exports.Vertex = Vertex;
|
|
|
9282
9427
|
* @modified 2019-03-20 Added JSDoc tags.
|
|
9283
9428
|
* @modified 2020-02-29 Added the 'selectable' attribute.
|
|
9284
9429
|
* @modified 2020-03-23 Ported to Typescript from JS.
|
|
9285
|
-
* @
|
|
9430
|
+
* @modified 2024-03-10 Fixed some types for Typescript 5 compatibility.
|
|
9431
|
+
* @version 1.1.2
|
|
9286
9432
|
*
|
|
9287
9433
|
* @file VertexAttr
|
|
9288
9434
|
* @public
|
|
@@ -9334,7 +9480,7 @@ exports.VertexAttr = VertexAttr;
|
|
|
9334
9480
|
|
|
9335
9481
|
/***/ }),
|
|
9336
9482
|
|
|
9337
|
-
/***/
|
|
9483
|
+
/***/ 934:
|
|
9338
9484
|
/***/ ((__unused_webpack_module, exports) => {
|
|
9339
9485
|
|
|
9340
9486
|
|
|
@@ -9607,7 +9753,7 @@ exports.VertexListeners = VertexListeners;
|
|
|
9607
9753
|
|
|
9608
9754
|
/***/ }),
|
|
9609
9755
|
|
|
9610
|
-
/***/
|
|
9756
|
+
/***/ 39:
|
|
9611
9757
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
9612
9758
|
|
|
9613
9759
|
|
|
@@ -9673,10 +9819,10 @@ exports.VertexListeners = VertexListeners;
|
|
|
9673
9819
|
**/
|
|
9674
9820
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
9675
9821
|
exports.drawutils = void 0;
|
|
9676
|
-
var CubicBezierCurve_1 = __webpack_require__(
|
|
9677
|
-
var Vertex_1 = __webpack_require__(
|
|
9678
|
-
var drawutilssvg_1 = __webpack_require__(
|
|
9679
|
-
var Vector_1 = __webpack_require__(
|
|
9822
|
+
var CubicBezierCurve_1 = __webpack_require__(973);
|
|
9823
|
+
var Vertex_1 = __webpack_require__(787);
|
|
9824
|
+
var drawutilssvg_1 = __webpack_require__(378);
|
|
9825
|
+
var Vector_1 = __webpack_require__(30);
|
|
9680
9826
|
// Todo: rename this class to Drawutils?
|
|
9681
9827
|
/**
|
|
9682
9828
|
* @classdesc A wrapper class for basic drawing operations.
|
|
@@ -10648,7 +10794,7 @@ var drawutils = /** @class */ (function () {
|
|
|
10648
10794
|
(options.fontFamily
|
|
10649
10795
|
? options.fontFamily.indexOf(" ") === -1
|
|
10650
10796
|
? options.fontFamily
|
|
10651
|
-
: "\""
|
|
10797
|
+
: "\"".concat(options.fontFamily, "\"")
|
|
10652
10798
|
: "Arial");
|
|
10653
10799
|
}
|
|
10654
10800
|
if (options.textAlign) {
|
|
@@ -10771,7 +10917,7 @@ exports.drawutils = drawutils;
|
|
|
10771
10917
|
|
|
10772
10918
|
/***/ }),
|
|
10773
10919
|
|
|
10774
|
-
/***/
|
|
10920
|
+
/***/ 264:
|
|
10775
10921
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
10776
10922
|
|
|
10777
10923
|
|
|
@@ -10797,7 +10943,7 @@ exports.drawutils = drawutils;
|
|
|
10797
10943
|
**/
|
|
10798
10944
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10799
10945
|
exports.drawutilsgl = void 0;
|
|
10800
|
-
var Vertex_1 = __webpack_require__(
|
|
10946
|
+
var Vertex_1 = __webpack_require__(787);
|
|
10801
10947
|
/**
|
|
10802
10948
|
* @classdesc A wrapper class for basic drawing operations. This is the WebGL
|
|
10803
10949
|
* implementation whih sould work with shaders.
|
|
@@ -11570,7 +11716,7 @@ var GLU = /** @class */ (function () {
|
|
|
11570
11716
|
|
|
11571
11717
|
/***/ }),
|
|
11572
11718
|
|
|
11573
|
-
/***/
|
|
11719
|
+
/***/ 378:
|
|
11574
11720
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
11575
11721
|
|
|
11576
11722
|
|
|
@@ -11620,16 +11766,17 @@ var GLU = /** @class */ (function () {
|
|
|
11620
11766
|
* @modified 2023-09-29 Added the `arrowHead(...)` function to the 'DrawLib.arrow()` interface.
|
|
11621
11767
|
* @modified 2023-09-29 Added the `cubicBezierArrow(...)` function to the 'DrawLib.arrow()` interface.
|
|
11622
11768
|
* @modified 2023-10-04 Adding `strokeOptions` param to these draw function: line, arrow, cubicBezierArrow, cubicBezier, cubicBezierPath, circle, circleArc, ellipse, square, rect, polygon, polyline.
|
|
11623
|
-
*
|
|
11624
|
-
* @
|
|
11769
|
+
* @modified 2024-01-30 Fixing an issue with immutable style sets; changes to the global draw config did not reflect here (do now).
|
|
11770
|
+
* @modified 2024-03-10 Fixing some types for Typescript 5 compatibility.
|
|
11771
|
+
* @version 1.6.9
|
|
11625
11772
|
**/
|
|
11626
11773
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11627
11774
|
exports.drawutilssvg = void 0;
|
|
11628
|
-
var CircleSector_1 = __webpack_require__(
|
|
11629
|
-
var CubicBezierCurve_1 = __webpack_require__(
|
|
11630
|
-
var Vertex_1 = __webpack_require__(
|
|
11631
|
-
var UIDGenerator_1 = __webpack_require__(
|
|
11632
|
-
var Vector_1 = __webpack_require__(
|
|
11775
|
+
var CircleSector_1 = __webpack_require__(135);
|
|
11776
|
+
var CubicBezierCurve_1 = __webpack_require__(973);
|
|
11777
|
+
var Vertex_1 = __webpack_require__(787);
|
|
11778
|
+
var UIDGenerator_1 = __webpack_require__(938);
|
|
11779
|
+
var Vector_1 = __webpack_require__(30);
|
|
11633
11780
|
var RAD_TO_DEG = 180 / Math.PI;
|
|
11634
11781
|
/**
|
|
11635
11782
|
* @classdesc A helper class for basic SVG drawing operations. This class should
|
|
@@ -11641,6 +11788,10 @@ var RAD_TO_DEG = 180 / Math.PI;
|
|
|
11641
11788
|
* @requires XYCoords
|
|
11642
11789
|
*/
|
|
11643
11790
|
var drawutilssvg = /** @class */ (function () {
|
|
11791
|
+
/**
|
|
11792
|
+
* Passed from primary to secondary instance.
|
|
11793
|
+
*/
|
|
11794
|
+
//private nodeStyle: SVGStyleElement;
|
|
11644
11795
|
/**
|
|
11645
11796
|
* The constructor.
|
|
11646
11797
|
*
|
|
@@ -11655,12 +11806,13 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
11655
11806
|
* @param {boolean=} isSecondary - (optional) Indicates if this is the primary or secondary instance. Only primary instances manage child nodes.
|
|
11656
11807
|
* @param {SVGGElement=} gNode - (optional) Primary and seconday instances share the same <g> node.
|
|
11657
11808
|
**/
|
|
11658
|
-
function drawutilssvg(svgNode, offset, scale, canvasSize, fillShapes, drawConfig, isSecondary, gNode, bufferGNode, nodeDefs, bufferNodeDefs) {
|
|
11809
|
+
function drawutilssvg(svgNode, offset, scale, canvasSize, fillShapes, drawConfig, isSecondary, gNode, bufferGNode, nodeDefs, bufferNodeDefs, nodeStyle) {
|
|
11659
11810
|
this.svgNode = svgNode;
|
|
11660
11811
|
this.offset = new Vertex_1.Vertex(0, 0).set(offset);
|
|
11661
11812
|
this.scale = new Vertex_1.Vertex(1, 1).set(scale);
|
|
11662
11813
|
this.fillShapes = fillShapes;
|
|
11663
11814
|
this.isSecondary = Boolean(isSecondary);
|
|
11815
|
+
this.drawConfig = drawConfig;
|
|
11664
11816
|
this.drawlibConfiguration = {};
|
|
11665
11817
|
this.cache = new Map();
|
|
11666
11818
|
this.setSize(canvasSize);
|
|
@@ -11672,6 +11824,9 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
11672
11824
|
this.bufferGNode = bufferGNode;
|
|
11673
11825
|
this.nodeDefs = nodeDefs;
|
|
11674
11826
|
this.bufferedNodeDefs = bufferNodeDefs;
|
|
11827
|
+
if (nodeStyle) {
|
|
11828
|
+
this.nodeStyle = nodeStyle;
|
|
11829
|
+
}
|
|
11675
11830
|
}
|
|
11676
11831
|
else {
|
|
11677
11832
|
this.addStyleDefs(drawConfig);
|
|
@@ -11690,11 +11845,19 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
11690
11845
|
drawutilssvg.prototype.addStyleDefs = function (drawConfig) {
|
|
11691
11846
|
this.nodeStyle = this.createSVGNode("style");
|
|
11692
11847
|
this.svgNode.appendChild(this.nodeStyle);
|
|
11848
|
+
this.rebuildStyleDefs(drawConfig);
|
|
11849
|
+
};
|
|
11850
|
+
/**
|
|
11851
|
+
* This method is required to re-define the global style defs. It is needed
|
|
11852
|
+
* if any value in the DrawConfig changed in the meantime.
|
|
11853
|
+
* @param drawConfig
|
|
11854
|
+
*/
|
|
11855
|
+
drawutilssvg.prototype.rebuildStyleDefs = function (drawConfig) {
|
|
11693
11856
|
// Which default styles to add? -> All from the DrawConfig.
|
|
11694
11857
|
// Compare with DrawConfig interface
|
|
11695
11858
|
var keys = {
|
|
11696
|
-
|
|
11697
|
-
"bezierPath": "BezierPath",
|
|
11859
|
+
"bezier": "CubicBezierCurve",
|
|
11860
|
+
//"bezierPath": "BezierPath", // TODO: is this correct?
|
|
11698
11861
|
"polygon": "Polygon",
|
|
11699
11862
|
"triangle": "Triangle",
|
|
11700
11863
|
"ellipse": "Ellipse",
|
|
@@ -11709,14 +11872,15 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
11709
11872
|
};
|
|
11710
11873
|
// Question: why isn't this working if the svgNode is created dynamically? (nodeStyle.sheet is null)
|
|
11711
11874
|
var rules = [];
|
|
11875
|
+
// console.log("drawConfig", drawConfig);
|
|
11712
11876
|
for (var k in keys) {
|
|
11713
11877
|
var className = keys[k];
|
|
11714
11878
|
var drawSettings = drawConfig[k];
|
|
11715
11879
|
if (drawSettings) {
|
|
11716
|
-
rules.push("."
|
|
11880
|
+
rules.push(".".concat(className, " { fill : none; stroke: ").concat(drawSettings.color, "; stroke-width: ").concat(drawSettings.lineWidth, "px }"));
|
|
11717
11881
|
}
|
|
11718
11882
|
else {
|
|
11719
|
-
console.warn("Warning: your draw config is missing the key '"
|
|
11883
|
+
console.warn("Warning: your draw config is missing the key '".concat(k, "' which is required."));
|
|
11720
11884
|
}
|
|
11721
11885
|
}
|
|
11722
11886
|
this.nodeStyle.innerHTML = rules.join("\n");
|
|
@@ -11806,7 +11970,8 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
11806
11970
|
node = this.createSVGNode(nodeName);
|
|
11807
11971
|
}
|
|
11808
11972
|
if (this.drawlibConfiguration.blendMode) {
|
|
11809
|
-
node.style["mix-blend-mode"] = this.drawlibConfiguration.blendMode;
|
|
11973
|
+
// node.style["mix-blend-mode"] = this.drawlibConfiguration.blendMode;
|
|
11974
|
+
node.style["mix-blend-mode"](this.drawlibConfiguration.blendMode);
|
|
11810
11975
|
}
|
|
11811
11976
|
// if (this.lineDashEnabled && this.lineDash && this.lineDash.length > 0 && drawutilssvg.nodeSupportsLineDash(nodeName)) {
|
|
11812
11977
|
// node.setAttribute("stroke-dasharray", this.lineDash.join(" "));
|
|
@@ -11870,7 +12035,7 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
11870
12035
|
*/
|
|
11871
12036
|
drawutilssvg.prototype._addCSSClasses = function (node, className) {
|
|
11872
12037
|
if (this.curClassName) {
|
|
11873
|
-
node.setAttribute("class", className
|
|
12038
|
+
node.setAttribute("class", "".concat(className, " ").concat(this.curClassName));
|
|
11874
12039
|
}
|
|
11875
12040
|
else {
|
|
11876
12041
|
node.setAttribute("class", className);
|
|
@@ -11880,9 +12045,9 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
11880
12045
|
this._addCSSClasses(node, className);
|
|
11881
12046
|
node.setAttribute("fill", fillMode && color ? color : "none");
|
|
11882
12047
|
node.setAttribute("stroke", fillMode ? "none" : color || "none");
|
|
11883
|
-
node.setAttribute("stroke-width", ""
|
|
12048
|
+
node.setAttribute("stroke-width", "".concat(lineWidth || 1));
|
|
11884
12049
|
if (this.curId) {
|
|
11885
|
-
node.setAttribute("id", ""
|
|
12050
|
+
node.setAttribute("id", "".concat(this.curId)); // Maybe React-style 'key' would be better?
|
|
11886
12051
|
}
|
|
11887
12052
|
this.applyStrokeOpts(node, strokeOptions);
|
|
11888
12053
|
return node;
|
|
@@ -11897,18 +12062,18 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
11897
12062
|
*/
|
|
11898
12063
|
drawutilssvg.prototype.setSize = function (canvasSize) {
|
|
11899
12064
|
this.canvasSize = canvasSize;
|
|
11900
|
-
this.svgNode.setAttribute("viewBox", "0 0 "
|
|
11901
|
-
this.svgNode.setAttribute("width", ""
|
|
11902
|
-
this.svgNode.setAttribute("height", ""
|
|
12065
|
+
this.svgNode.setAttribute("viewBox", "0 0 ".concat(this.canvasSize.width, " ").concat(this.canvasSize.height));
|
|
12066
|
+
this.svgNode.setAttribute("width", "".concat(this.canvasSize.width));
|
|
12067
|
+
this.svgNode.setAttribute("height", "".concat(this.canvasSize.height));
|
|
11903
12068
|
};
|
|
11904
12069
|
/**
|
|
11905
12070
|
* Creates a 'shallow' (non deep) copy of this instance. This implies
|
|
11906
12071
|
* that under the hood the same gl context and gl program will be used.
|
|
11907
12072
|
*/
|
|
11908
12073
|
drawutilssvg.prototype.copyInstance = function (fillShapes) {
|
|
11909
|
-
var copy = new drawutilssvg(this.svgNode, this.offset, this.scale, this.canvasSize, fillShapes, null, // no DrawConfig – this will work as long as `isSecondary===true`
|
|
12074
|
+
var copy = new drawutilssvg(this.svgNode, this.offset, this.scale, this.canvasSize, fillShapes, this.drawConfig, // null as any as DrawConfig, // no DrawConfig – this will work as long as `isSecondary===true`
|
|
11910
12075
|
true, // isSecondary
|
|
11911
|
-
this.gNode, this.bufferGNode, this.nodeDefs, this.bufferedNodeDefs);
|
|
12076
|
+
this.gNode, this.bufferGNode, this.nodeDefs, this.bufferedNodeDefs, this.nodeStyle);
|
|
11912
12077
|
return copy;
|
|
11913
12078
|
};
|
|
11914
12079
|
/**
|
|
@@ -11921,20 +12086,6 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
11921
12086
|
drawutilssvg.prototype.setConfiguration = function (configuration) {
|
|
11922
12087
|
this.drawlibConfiguration = configuration;
|
|
11923
12088
|
};
|
|
11924
|
-
// /**
|
|
11925
|
-
// * Set or clear the line-dash configuration. Pass `null` for un-dashed lines.
|
|
11926
|
-
// *
|
|
11927
|
-
// * See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray
|
|
11928
|
-
// * and https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash
|
|
11929
|
-
// * for how line dashes work.
|
|
11930
|
-
// *
|
|
11931
|
-
// * @method
|
|
11932
|
-
// * @param {Array<number> lineDashes - The line-dash array configuration.
|
|
11933
|
-
// * @returns {void}
|
|
11934
|
-
// */
|
|
11935
|
-
// setLineDash(lineDashes: Array<number>) {
|
|
11936
|
-
// this.lineDash = lineDashes;
|
|
11937
|
-
// }
|
|
11938
12089
|
/**
|
|
11939
12090
|
* This method shouled be called each time the currently drawn `Drawable` changes.
|
|
11940
12091
|
* It is used by some libraries for identifying elemente on re-renders.
|
|
@@ -11994,6 +12145,7 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
11994
12145
|
* @instance
|
|
11995
12146
|
**/
|
|
11996
12147
|
drawutilssvg.prototype.endDrawCycle = function (renderTime) {
|
|
12148
|
+
this.rebuildStyleDefs(this.drawConfig);
|
|
11997
12149
|
if (!this.isSecondary) {
|
|
11998
12150
|
// All elements are drawn into the buffer; they are NOT yet visible, not did the browser perform any
|
|
11999
12151
|
// layout updates.
|
|
@@ -12026,7 +12178,7 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
12026
12178
|
})
|
|
12027
12179
|
.join(" "));
|
|
12028
12180
|
if (strokeOptions.dashOffset) {
|
|
12029
|
-
node.setAttribute("stroke-dashoffset", ""
|
|
12181
|
+
node.setAttribute("stroke-dashoffset", "".concat(strokeOptions.dashOffset * this.scale.x));
|
|
12030
12182
|
}
|
|
12031
12183
|
}
|
|
12032
12184
|
};
|
|
@@ -12162,13 +12314,13 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
12162
12314
|
if (image.naturalWidth) {
|
|
12163
12315
|
var ratioX = size.x / image.naturalWidth;
|
|
12164
12316
|
var ratioY = size.y / image.naturalHeight;
|
|
12165
|
-
node.setAttribute("width", ""
|
|
12166
|
-
node.setAttribute("height", ""
|
|
12317
|
+
node.setAttribute("width", "".concat(image.naturalWidth * _this.scale.x));
|
|
12318
|
+
node.setAttribute("height", "".concat(image.naturalHeight * _this.scale.y));
|
|
12167
12319
|
node.setAttribute("display", null); // Dislay when loaded
|
|
12168
12320
|
// if (alpha) {
|
|
12169
|
-
node.setAttribute("opacity", ""
|
|
12321
|
+
node.setAttribute("opacity", "".concat(alpha));
|
|
12170
12322
|
// }
|
|
12171
|
-
node.setAttribute("transform", "translate("
|
|
12323
|
+
node.setAttribute("transform", "translate(".concat(_this._x(position.x), " ").concat(_this._y(position.y), ") scale(").concat(ratioX, " ").concat(ratioY, ")"));
|
|
12172
12324
|
}
|
|
12173
12325
|
};
|
|
12174
12326
|
image.addEventListener("load", function (event) {
|
|
@@ -12176,8 +12328,8 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
12176
12328
|
});
|
|
12177
12329
|
// Safari has a transform-origin bug.
|
|
12178
12330
|
// Use x=0, y=0 and translate/scale instead (see above)
|
|
12179
|
-
node.setAttribute("x", ""
|
|
12180
|
-
node.setAttribute("y", ""
|
|
12331
|
+
node.setAttribute("x", "".concat(0));
|
|
12332
|
+
node.setAttribute("y", "".concat(0));
|
|
12181
12333
|
node.setAttribute("display", "none"); // Hide before loaded
|
|
12182
12334
|
setImageSize(image);
|
|
12183
12335
|
node.setAttribute("href", image.src);
|
|
@@ -12218,36 +12370,36 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
12218
12370
|
// </image>
|
|
12219
12371
|
// ...
|
|
12220
12372
|
var clipPathNode = this.makeNode("clipPath");
|
|
12221
|
-
var clipPathId = "clippath_"
|
|
12373
|
+
var clipPathId = "clippath_".concat(UIDGenerator_1.UIDGenerator.next()); // TODO: use a better UUID generator here?
|
|
12222
12374
|
clipPathNode.setAttribute("id", clipPathId);
|
|
12223
12375
|
var gNode = this.makeNode("g");
|
|
12224
12376
|
var imageNode = this.makeNode("image");
|
|
12225
|
-
imageNode.setAttribute("x", ""
|
|
12226
|
-
imageNode.setAttribute("y", ""
|
|
12227
|
-
imageNode.setAttribute("width", ""
|
|
12228
|
-
imageNode.setAttribute("height", ""
|
|
12377
|
+
imageNode.setAttribute("x", "".concat(this._x(rotatedScalingOrigin.x)));
|
|
12378
|
+
imageNode.setAttribute("y", "".concat(this._y(rotatedScalingOrigin.y)));
|
|
12379
|
+
imageNode.setAttribute("width", "".concat(textureSize.width));
|
|
12380
|
+
imageNode.setAttribute("height", "".concat(textureSize.height));
|
|
12229
12381
|
imageNode.setAttribute("href", textureImage.src);
|
|
12230
12382
|
// imageNode.setAttribute("opacity", "0.5");
|
|
12231
12383
|
// SVG rotations in degrees
|
|
12232
|
-
imageNode.setAttribute("transform", "rotate("
|
|
12384
|
+
imageNode.setAttribute("transform", "rotate(".concat(rotation * RAD_TO_DEG, ", ").concat(this._x(rotatedScalingOrigin.x), ", ").concat(this._y(rotatedScalingOrigin.y), ")"));
|
|
12233
12385
|
var pathNode = this.makeNode("path");
|
|
12234
12386
|
var pathData = [];
|
|
12235
12387
|
if (polygon.vertices.length > 0) {
|
|
12236
12388
|
var self_1 = this;
|
|
12237
|
-
pathData.push("M", ""
|
|
12389
|
+
pathData.push("M", "".concat(this._x(polygon.vertices[0].x)), "".concat(this._y(polygon.vertices[0].y)));
|
|
12238
12390
|
for (var i = 1; i < polygon.vertices.length; i++) {
|
|
12239
|
-
pathData.push("L", ""
|
|
12391
|
+
pathData.push("L", "".concat(this._x(polygon.vertices[i].x)), "".concat(this._y(polygon.vertices[i].y)));
|
|
12240
12392
|
}
|
|
12241
12393
|
}
|
|
12242
12394
|
pathNode.setAttribute("d", pathData.join(" "));
|
|
12243
12395
|
clipPathNode.appendChild(pathNode);
|
|
12244
12396
|
this.bufferedNodeDefs.appendChild(clipPathNode);
|
|
12245
12397
|
gNode.appendChild(imageNode);
|
|
12246
|
-
gNode.setAttribute("transform-origin", this._x(rotatedScalingOrigin.x)
|
|
12247
|
-
gNode.setAttribute("transform", "scale("
|
|
12398
|
+
gNode.setAttribute("transform-origin", "".concat(this._x(rotatedScalingOrigin.x), " ").concat(this._y(rotatedScalingOrigin.y)));
|
|
12399
|
+
gNode.setAttribute("transform", "scale(".concat(this.scale.x, ", ").concat(this.scale.y, ")"));
|
|
12248
12400
|
var clipNode = this.makeNode("g");
|
|
12249
12401
|
clipNode.appendChild(gNode);
|
|
12250
|
-
clipNode.setAttribute("clip-path", "url(#"
|
|
12402
|
+
clipNode.setAttribute("clip-path", "url(#".concat(clipPathId, ")"));
|
|
12251
12403
|
// TODO: check if the image class is correct here or if we should use a 'clippedImage' class here
|
|
12252
12404
|
this._bindFillDraw(clipNode, "image", null, null); // No color, no lineWidth
|
|
12253
12405
|
return clipNode;
|
|
@@ -12352,10 +12504,10 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
12352
12504
|
*/
|
|
12353
12505
|
drawutilssvg.prototype.dot = function (p, color) {
|
|
12354
12506
|
var node = this.makeNode("line");
|
|
12355
|
-
node.setAttribute("x1", ""
|
|
12356
|
-
node.setAttribute("y1", ""
|
|
12357
|
-
node.setAttribute("x2", ""
|
|
12358
|
-
node.setAttribute("y2", ""
|
|
12507
|
+
node.setAttribute("x1", "".concat(this._x(p.x)));
|
|
12508
|
+
node.setAttribute("y1", "".concat(this._y(p.y)));
|
|
12509
|
+
node.setAttribute("x2", "".concat(this._x(p.x)));
|
|
12510
|
+
node.setAttribute("y2", "".concat(this._y(p.y)));
|
|
12359
12511
|
return this._bindFillDraw(node, "dot", color, 1);
|
|
12360
12512
|
};
|
|
12361
12513
|
/**
|
|
@@ -12371,9 +12523,9 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
12371
12523
|
drawutilssvg.prototype.point = function (p, color) {
|
|
12372
12524
|
var radius = 3;
|
|
12373
12525
|
var node = this.makeNode("circle");
|
|
12374
|
-
node.setAttribute("cx", ""
|
|
12375
|
-
node.setAttribute("cy", ""
|
|
12376
|
-
node.setAttribute("r", ""
|
|
12526
|
+
node.setAttribute("cx", "".concat(this._x(p.x)));
|
|
12527
|
+
node.setAttribute("cy", "".concat(this._y(p.y)));
|
|
12528
|
+
node.setAttribute("r", "".concat(radius));
|
|
12377
12529
|
return this._bindFillDraw(node, "point", color, 1);
|
|
12378
12530
|
};
|
|
12379
12531
|
/**
|
|
@@ -12396,9 +12548,9 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
12396
12548
|
// Todo: draw ellipse when scalex!=scaley
|
|
12397
12549
|
var node = this.makeNode("circle");
|
|
12398
12550
|
this.applyStrokeOpts(node, strokeOptions);
|
|
12399
|
-
node.setAttribute("cx", ""
|
|
12400
|
-
node.setAttribute("cy", ""
|
|
12401
|
-
node.setAttribute("r", ""
|
|
12551
|
+
node.setAttribute("cx", "".concat(this._x(center.x)));
|
|
12552
|
+
node.setAttribute("cy", "".concat(this._y(center.y)));
|
|
12553
|
+
node.setAttribute("r", "".concat(radius * this.scale.x)); // y?
|
|
12402
12554
|
return this._bindFillDraw(node, "circle", color, lineWidth || 1);
|
|
12403
12555
|
};
|
|
12404
12556
|
/**
|
|
@@ -12446,12 +12598,12 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
12446
12598
|
}
|
|
12447
12599
|
var node = this.makeNode("ellipse");
|
|
12448
12600
|
this.applyStrokeOpts(node, strokeOptions);
|
|
12449
|
-
node.setAttribute("cx", ""
|
|
12450
|
-
node.setAttribute("cy", ""
|
|
12451
|
-
node.setAttribute("rx", ""
|
|
12452
|
-
node.setAttribute("ry", ""
|
|
12601
|
+
node.setAttribute("cx", "".concat(this._x(center.x)));
|
|
12602
|
+
node.setAttribute("cy", "".concat(this._y(center.y)));
|
|
12603
|
+
node.setAttribute("rx", "".concat(radiusX * this.scale.x));
|
|
12604
|
+
node.setAttribute("ry", "".concat(radiusY * this.scale.y));
|
|
12453
12605
|
// node.setAttribute( 'style', `transform: rotate(${rotation} ${center.x} ${center.y})` );
|
|
12454
|
-
node.setAttribute("transform", "rotate("
|
|
12606
|
+
node.setAttribute("transform", "rotate(".concat((rotation * 180) / Math.PI, " ").concat(this._x(center.x), " ").concat(this._y(center.y), ")"));
|
|
12455
12607
|
return this._bindFillDraw(node, "ellipse", color, lineWidth || 1);
|
|
12456
12608
|
};
|
|
12457
12609
|
/**
|
|
@@ -12473,10 +12625,10 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
12473
12625
|
drawutilssvg.prototype.square = function (center, size, color, lineWidth, strokeOptions) {
|
|
12474
12626
|
var node = this.makeNode("rectangle");
|
|
12475
12627
|
this.applyStrokeOpts(node, strokeOptions);
|
|
12476
|
-
node.setAttribute("x", ""
|
|
12477
|
-
node.setAttribute("y", ""
|
|
12478
|
-
node.setAttribute("width", ""
|
|
12479
|
-
node.setAttribute("height", ""
|
|
12628
|
+
node.setAttribute("x", "".concat(this._x(center.x - size / 2.0)));
|
|
12629
|
+
node.setAttribute("y", "".concat(this._y(center.y - size / 2.0)));
|
|
12630
|
+
node.setAttribute("width", "".concat(size * this.scale.x));
|
|
12631
|
+
node.setAttribute("height", "".concat(size * this.scale.y));
|
|
12480
12632
|
return this._bindFillDraw(node, "square", color, lineWidth || 1);
|
|
12481
12633
|
};
|
|
12482
12634
|
/**
|
|
@@ -12496,10 +12648,10 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
12496
12648
|
drawutilssvg.prototype.rect = function (position, width, height, color, lineWidth, strokeOptions) {
|
|
12497
12649
|
var node = this.makeNode("rect");
|
|
12498
12650
|
this.applyStrokeOpts(node, strokeOptions);
|
|
12499
|
-
node.setAttribute("x", ""
|
|
12500
|
-
node.setAttribute("y", ""
|
|
12501
|
-
node.setAttribute("width", ""
|
|
12502
|
-
node.setAttribute("height", ""
|
|
12651
|
+
node.setAttribute("x", "".concat(this._x(position.x)));
|
|
12652
|
+
node.setAttribute("y", "".concat(this._y(position.y)));
|
|
12653
|
+
node.setAttribute("width", "".concat(width * this.scale.x));
|
|
12654
|
+
node.setAttribute("height", "".concat(height * this.scale.y));
|
|
12503
12655
|
return this._bindFillDraw(node, "rect", color, lineWidth || 1);
|
|
12504
12656
|
};
|
|
12505
12657
|
/**
|
|
@@ -12617,10 +12769,10 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
12617
12769
|
*/
|
|
12618
12770
|
drawutilssvg.prototype.squareHandle = function (center, size, color) {
|
|
12619
12771
|
var node = this.makeNode("rect");
|
|
12620
|
-
node.setAttribute("x", ""
|
|
12621
|
-
node.setAttribute("y", ""
|
|
12622
|
-
node.setAttribute("width", ""
|
|
12623
|
-
node.setAttribute("height", ""
|
|
12772
|
+
node.setAttribute("x", "".concat(this._x(center.x) - size / 2.0));
|
|
12773
|
+
node.setAttribute("y", "".concat(this._y(center.y) - size / 2.0));
|
|
12774
|
+
node.setAttribute("width", "".concat(size));
|
|
12775
|
+
node.setAttribute("height", "".concat(size));
|
|
12624
12776
|
return this._bindFillDraw(node, "squareHandle", color, 1);
|
|
12625
12777
|
};
|
|
12626
12778
|
/**
|
|
@@ -12641,9 +12793,9 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
12641
12793
|
drawutilssvg.prototype.circleHandle = function (center, radius, color) {
|
|
12642
12794
|
radius = radius || 3;
|
|
12643
12795
|
var node = this.makeNode("circle");
|
|
12644
|
-
node.setAttribute("cx", ""
|
|
12645
|
-
node.setAttribute("cy", ""
|
|
12646
|
-
node.setAttribute("r", ""
|
|
12796
|
+
node.setAttribute("cx", "".concat(this._x(center.x)));
|
|
12797
|
+
node.setAttribute("cy", "".concat(this._y(center.y)));
|
|
12798
|
+
node.setAttribute("r", "".concat(radius));
|
|
12647
12799
|
return this._bindFillDraw(node, "circleHandle", color, 1);
|
|
12648
12800
|
};
|
|
12649
12801
|
/**
|
|
@@ -12790,22 +12942,22 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
12790
12942
|
: options.textAlign === "right" || options.textAlign === "end"
|
|
12791
12943
|
? "end"
|
|
12792
12944
|
: "start";
|
|
12793
|
-
var transformOrigin = this._x(x)
|
|
12794
|
-
var translate = "translate("
|
|
12945
|
+
var transformOrigin = "".concat(this._x(x), "px ").concat(this._y(y), "px");
|
|
12946
|
+
var translate = "translate(".concat(this._x(x), " ").concat(this._y(y) + lineHeight / 2, ")");
|
|
12795
12947
|
// Safari has a transform-origin/rotation bug.
|
|
12796
12948
|
// It's essential to use rotate(r,x,y) here. "rotate(r)"" with transform-origin(x,y) won't do the job.
|
|
12797
12949
|
// And rotate and translate cannot be used is combination on a text object.
|
|
12798
12950
|
// So wrap the text inside a <g>, translate the <g>, and rotate the text inside.
|
|
12799
|
-
var rotate = options.rotation ? "rotate("
|
|
12951
|
+
var rotate = options.rotation ? "rotate(".concat(options.rotation * RAD_TO_DEG, " 0 0)") : "";
|
|
12800
12952
|
var node = this.makeNode("g");
|
|
12801
12953
|
var curId = this.curId;
|
|
12802
12954
|
this.curId = curId + "_text";
|
|
12803
12955
|
var textNode = this.makeNode("text");
|
|
12804
12956
|
node.appendChild(textNode);
|
|
12805
12957
|
textNode.setAttribute("font-family", (_c = options.fontFamily) !== null && _c !== void 0 ? _c : ""); // May be undefined
|
|
12806
|
-
textNode.setAttribute("font-size", options.fontSize ? ""
|
|
12807
|
-
textNode.setAttribute("font-style", options.fontStyle ? ""
|
|
12808
|
-
textNode.setAttribute("font-weight", options.fontWeight ? ""
|
|
12958
|
+
textNode.setAttribute("font-size", options.fontSize ? "".concat(options.fontSize * this.scale.x) : "");
|
|
12959
|
+
textNode.setAttribute("font-style", options.fontStyle ? "".concat(options.fontStyle) : "");
|
|
12960
|
+
textNode.setAttribute("font-weight", options.fontWeight ? "".concat(options.fontWeight) : "");
|
|
12809
12961
|
textNode.setAttribute("text-anchor", textAlign);
|
|
12810
12962
|
textNode.setAttribute("transform-origin", "0 0");
|
|
12811
12963
|
textNode.setAttribute("transform", rotate);
|
|
@@ -12832,7 +12984,7 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
12832
12984
|
drawutilssvg.prototype.label = function (text, x, y, rotation, color) {
|
|
12833
12985
|
var node = this.makeNode("text");
|
|
12834
12986
|
// For some strange reason SVG rotation transforms use degrees instead of radians
|
|
12835
|
-
node.setAttribute("transform", "translate("
|
|
12987
|
+
node.setAttribute("transform", "translate(".concat(x, ",").concat(y, "), rotate(").concat(((rotation || 0) / Math.PI) * 180, ")"));
|
|
12836
12988
|
node.setAttribute("font-family", "Arial");
|
|
12837
12989
|
node.setAttribute("font-size", "9pt");
|
|
12838
12990
|
node.setAttribute("font-style", "normal");
|
|
@@ -12889,8 +13041,8 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
12889
13041
|
// Note that the background does not scale with the zoom level (always covers full element)
|
|
12890
13042
|
node.setAttribute("x", "0");
|
|
12891
13043
|
node.setAttribute("y", "0");
|
|
12892
|
-
node.setAttribute("width", ""
|
|
12893
|
-
node.setAttribute("height", ""
|
|
13044
|
+
node.setAttribute("width", "".concat(this.canvasSize.width));
|
|
13045
|
+
node.setAttribute("height", "".concat(this.canvasSize.height));
|
|
12894
13046
|
// Bind this special element into the document
|
|
12895
13047
|
this._bindFillDraw(node, this.curId, null, null);
|
|
12896
13048
|
node.setAttribute("fill", typeof color === "undefined" ? "none" : color);
|
|
@@ -13121,10 +13273,10 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
13121
13273
|
*/
|
|
13122
13274
|
drawutilssvg.prototype.makeLineNode = function (zA, zB, color, lineWidth, strokeOptions, classNameOverride) {
|
|
13123
13275
|
var line = this.makeNode("line");
|
|
13124
|
-
line.setAttribute("x1", ""
|
|
13125
|
-
line.setAttribute("y1", ""
|
|
13126
|
-
line.setAttribute("x2", ""
|
|
13127
|
-
line.setAttribute("y2", ""
|
|
13276
|
+
line.setAttribute("x1", "".concat(this._x(zA.x)));
|
|
13277
|
+
line.setAttribute("y1", "".concat(this._y(zA.y)));
|
|
13278
|
+
line.setAttribute("x2", "".concat(this._x(zB.x)));
|
|
13279
|
+
line.setAttribute("y2", "".concat(this._y(zB.y)));
|
|
13128
13280
|
this._configureNode(line, classNameOverride !== null && classNameOverride !== void 0 ? classNameOverride : "line", this.fillShapes, color, lineWidth || 1, strokeOptions);
|
|
13129
13281
|
return line;
|
|
13130
13282
|
};
|
|
@@ -13234,7 +13386,7 @@ exports.drawutilssvg = drawutilssvg;
|
|
|
13234
13386
|
|
|
13235
13387
|
/***/ }),
|
|
13236
13388
|
|
|
13237
|
-
/***/
|
|
13389
|
+
/***/ 328:
|
|
13238
13390
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
13239
13391
|
|
|
13240
13392
|
|
|
@@ -13246,8 +13398,8 @@ exports.drawutilssvg = drawutilssvg;
|
|
|
13246
13398
|
**/
|
|
13247
13399
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
13248
13400
|
exports.geomutils = void 0;
|
|
13249
|
-
var Line_1 = __webpack_require__(
|
|
13250
|
-
var Triangle_1 = __webpack_require__(
|
|
13401
|
+
var Line_1 = __webpack_require__(939);
|
|
13402
|
+
var Triangle_1 = __webpack_require__(737);
|
|
13251
13403
|
/**
|
|
13252
13404
|
* A collection of usefull geometry utilities.
|
|
13253
13405
|
*
|
|
@@ -13278,14 +13430,14 @@ exports.geomutils = {
|
|
|
13278
13430
|
if (insideAngle < 0)
|
|
13279
13431
|
insideAngle = 2 * Math.PI + insideAngle;
|
|
13280
13432
|
if (!clockwise)
|
|
13281
|
-
insideAngle = (2 * Math.PI - insideAngle) *
|
|
13433
|
+
insideAngle = (2 * Math.PI - insideAngle) * -1;
|
|
13282
13434
|
// Scale the rotated lines to the max leg length (looks better)
|
|
13283
13435
|
var lineLength = Math.max(lineAB.length(), lineAC.length());
|
|
13284
13436
|
var scaleFactor = lineLength / lineAB.length();
|
|
13285
13437
|
var result = [];
|
|
13286
13438
|
for (var i = 1; i < n; i++) {
|
|
13287
13439
|
// Compute the i-th inner sector line
|
|
13288
|
-
result.push(new Line_1.Line(pA, pB.clone().rotate(
|
|
13440
|
+
result.push(new Line_1.Line(pA, pB.clone().rotate(-i * (insideAngle / n), pA)).scale(scaleFactor));
|
|
13289
13441
|
}
|
|
13290
13442
|
return result;
|
|
13291
13443
|
},
|
|
@@ -13328,8 +13480,9 @@ exports.geomutils = {
|
|
|
13328
13480
|
/******/ // The require function
|
|
13329
13481
|
/******/ function __webpack_require__(moduleId) {
|
|
13330
13482
|
/******/ // Check if module is in cache
|
|
13331
|
-
/******/
|
|
13332
|
-
/******/
|
|
13483
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
13484
|
+
/******/ if (cachedModule !== undefined) {
|
|
13485
|
+
/******/ return cachedModule.exports;
|
|
13333
13486
|
/******/ }
|
|
13334
13487
|
/******/ // Create a new module (and put it into the cache)
|
|
13335
13488
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
@@ -13360,7 +13513,7 @@ exports.geomutils = {
|
|
|
13360
13513
|
/******/
|
|
13361
13514
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
13362
13515
|
/******/ (() => {
|
|
13363
|
-
/******/ __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop)
|
|
13516
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
13364
13517
|
/******/ })();
|
|
13365
13518
|
/******/
|
|
13366
13519
|
/******/ /* webpack/runtime/make namespace object */
|
|
@@ -13375,36 +13528,38 @@ exports.geomutils = {
|
|
|
13375
13528
|
/******/ })();
|
|
13376
13529
|
/******/
|
|
13377
13530
|
/************************************************************************/
|
|
13531
|
+
var __webpack_exports__ = {};
|
|
13532
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
13378
13533
|
(() => {
|
|
13379
13534
|
|
|
13380
13535
|
/* Imports for webpack */
|
|
13381
13536
|
|
|
13382
|
-
globalThis.UIDGenerator = __webpack_require__(
|
|
13383
|
-
globalThis.VertexAttr = __webpack_require__(
|
|
13384
|
-
globalThis.VertexListeners = __webpack_require__(
|
|
13385
|
-
globalThis.Vertex = __webpack_require__(
|
|
13537
|
+
globalThis.UIDGenerator = (__webpack_require__(938).UIDGenerator);
|
|
13538
|
+
globalThis.VertexAttr = (__webpack_require__(476).VertexAttr);
|
|
13539
|
+
globalThis.VertexListeners = (__webpack_require__(934).VertexListeners);
|
|
13540
|
+
globalThis.Vertex = (__webpack_require__(787).Vertex);
|
|
13386
13541
|
|
|
13387
|
-
globalThis.Bounds = __webpack_require__(
|
|
13388
|
-
globalThis.Grid = __webpack_require__(
|
|
13389
|
-
globalThis.Line = __webpack_require__(
|
|
13390
|
-
globalThis.Vector = __webpack_require__(
|
|
13391
|
-
globalThis.CubicBezierCurve = __webpack_require__(
|
|
13392
|
-
globalThis.BezierPath = __webpack_require__(
|
|
13393
|
-
globalThis.Polygon = __webpack_require__(
|
|
13394
|
-
globalThis.Triangle = __webpack_require__(
|
|
13395
|
-
globalThis.VEllipse = __webpack_require__(
|
|
13396
|
-
globalThis.VEllipseSector = __webpack_require__(
|
|
13397
|
-
globalThis.Circle = __webpack_require__(
|
|
13398
|
-
globalThis.CircleSector = __webpack_require__(
|
|
13399
|
-
globalThis.PBImage = __webpack_require__(
|
|
13400
|
-
globalThis.PBText = __webpack_require__(
|
|
13401
|
-
globalThis.MouseHandler = __webpack_require__(
|
|
13402
|
-
globalThis.KeyHandler = __webpack_require__(
|
|
13403
|
-
globalThis.drawutils = __webpack_require__(
|
|
13542
|
+
globalThis.Bounds = (__webpack_require__(76).Bounds);
|
|
13543
|
+
globalThis.Grid = (__webpack_require__(289).Grid);
|
|
13544
|
+
globalThis.Line = (__webpack_require__(939).Line);
|
|
13545
|
+
globalThis.Vector = (__webpack_require__(30).Vector);
|
|
13546
|
+
globalThis.CubicBezierCurve = (__webpack_require__(973).CubicBezierCurve);
|
|
13547
|
+
globalThis.BezierPath = (__webpack_require__(733).BezierPath);
|
|
13548
|
+
globalThis.Polygon = (__webpack_require__(687).Polygon);
|
|
13549
|
+
globalThis.Triangle = (__webpack_require__(737).Triangle);
|
|
13550
|
+
globalThis.VEllipse = (__webpack_require__(881).VEllipse);
|
|
13551
|
+
globalThis.VEllipseSector = (__webpack_require__(719).VEllipseSector);
|
|
13552
|
+
globalThis.Circle = (__webpack_require__(118).Circle);
|
|
13553
|
+
globalThis.CircleSector = (__webpack_require__(135).CircleSector);
|
|
13554
|
+
globalThis.PBImage = (__webpack_require__(862).PBImage);
|
|
13555
|
+
globalThis.PBText = (__webpack_require__(628).PBText);
|
|
13556
|
+
globalThis.MouseHandler = (__webpack_require__(912).MouseHandler);
|
|
13557
|
+
globalThis.KeyHandler = (__webpack_require__(531).KeyHandler);
|
|
13558
|
+
globalThis.drawutils = (__webpack_require__(39).drawutils);
|
|
13404
13559
|
// globalThis.drawutilsgl = require("./drawgl.js").drawutilsgl; // Unfinished
|
|
13405
|
-
globalThis.drawutilssvg = __webpack_require__(
|
|
13406
|
-
globalThis.geomutils = __webpack_require__(
|
|
13407
|
-
globalThis.PlotBoilerplate = __webpack_require__(
|
|
13560
|
+
globalThis.drawutilssvg = (__webpack_require__(378).drawutilssvg);
|
|
13561
|
+
globalThis.geomutils = (__webpack_require__(328).geomutils);
|
|
13562
|
+
globalThis.PlotBoilerplate = (__webpack_require__(559).PlotBoilerplate);
|
|
13408
13563
|
|
|
13409
13564
|
})();
|
|
13410
13565
|
|