plotboilerplate 1.23.1 → 1.23.2
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 +1 -1
- package/dist/index.esm.js +14 -8
- 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 +14 -8
- package/dist/plotboilerplate.min.js +1 -1
- package/package.json +1 -1
- package/src/cjs/PlotBoilerplate.d.ts +2 -1
- package/src/cjs/PlotBoilerplate.js +4 -2
- package/src/cjs/PlotBoilerplate.js.map +1 -1
- package/src/cjs/drawutilssvg.d.ts +6 -1
- package/src/cjs/drawutilssvg.js +10 -6
- package/src/cjs/drawutilssvg.js.map +1 -1
- package/src/cjs/interfaces/core.d.ts +4 -2
- package/src/cjs/interfaces/core.js +1 -0
- package/src/cjs/interfaces/core.js.map +1 -1
- package/src/cjs/interfaces/externals.d.ts +30 -0
- package/src/cjs/utils/InitializationObserver.js +7 -0
- package/src/cjs/utils/InitializationObserver.js.map +1 -1
- package/src/cjs/utils/Params.d.ts +5 -3
- package/src/cjs/utils/Params.js +7 -3
- package/src/cjs/utils/Params.js.map +1 -1
- package/src/cjs/utils/creategui.js +69 -1
- package/src/cjs/utils/gup.d.ts +1 -0
- package/src/cjs/utils/gup.js +3 -1
- package/src/cjs/utils/gup.js.map +1 -1
- package/src/esm/PlotBoilerplate.d.ts +2 -1
- package/src/esm/PlotBoilerplate.js +4 -2
- package/src/esm/PlotBoilerplate.js.map +1 -1
- package/src/esm/drawutilssvg.d.ts +6 -1
- package/src/esm/drawutilssvg.js +10 -6
- package/src/esm/drawutilssvg.js.map +1 -1
- package/src/esm/interfaces/core.d.ts +4 -2
- package/src/esm/interfaces/core.js +1 -0
- package/src/esm/interfaces/core.js.map +1 -1
- package/src/esm/interfaces/externals.d.ts +30 -0
- package/src/esm/utils/InitializationObserver.js +7 -0
- package/src/esm/utils/InitializationObserver.js.map +1 -1
- package/src/esm/utils/Params.d.ts +5 -3
- package/src/esm/utils/Params.js +7 -3
- package/src/esm/utils/Params.js.map +1 -1
- package/src/esm/utils/gup.d.ts +1 -0
- package/src/esm/utils/gup.js +3 -1
- package/src/esm/utils/gup.js.map +1 -1
- package/src/index-gl.js +3 -1
- package/src/index.js +2 -1
- package/src/ts/PlotBoilerplate.ts +5 -2
- package/src/ts/drawutilssvg.ts +17 -6
- package/src/ts/interfaces/core.ts +5 -2
- package/src/ts/interfaces/externals.ts +34 -0
- package/src/ts/utils/InitializationObserver.ts +7 -0
- package/src/ts/utils/Params.ts +8 -3
- package/src/ts/utils/gup.ts +3 -1
package/README.md
CHANGED
|
@@ -304,7 +304,7 @@ var pb = new PlotBoilerplate({
|
|
|
304
304
|
|
|
305
305
|
// string
|
|
306
306
|
// A background color (CSS string) for the canvas.
|
|
307
|
-
backgroundColor: "#ffffff",
|
|
307
|
+
backgroundColor: isDarkmode ? "#000000" : "#ffffff",
|
|
308
308
|
|
|
309
309
|
// boolean
|
|
310
310
|
// Switch auto-redrawing on resize on/off (some applications
|
package/dist/index.esm.js
CHANGED
|
@@ -4711,7 +4711,8 @@ CircleSector.circleSectorUtils = {
|
|
|
4711
4711
|
* @modified 2023-10-04 Adding `strokeOptions` param to these draw function: line, arrow, cubicBezierArrow, cubicBezier, cubicBezierPath, circle, circleArc, ellipse, square, rect, polygon, polyline.
|
|
4712
4712
|
* @modified 2024-01-30 Fixing an issue with immutable style sets; changes to the global draw config did not reflect here (do now).
|
|
4713
4713
|
* @modified 2024-03-10 Fixing some types for Typescript 5 compatibility.
|
|
4714
|
-
* @
|
|
4714
|
+
* @modified 2024-07-24 Caching custom style defs in a private buffer variable.
|
|
4715
|
+
* @version 1.6.10
|
|
4715
4716
|
**/
|
|
4716
4717
|
const RAD_TO_DEG = 180 / Math.PI;
|
|
4717
4718
|
/**
|
|
@@ -4819,6 +4820,13 @@ class drawutilssvg {
|
|
|
4819
4820
|
console.warn(`Warning: your draw config is missing the key '${k}' which is required.`);
|
|
4820
4821
|
}
|
|
4821
4822
|
}
|
|
4823
|
+
if (this.customStyleDefs) {
|
|
4824
|
+
rules.push("\n/* Custom styles */\n");
|
|
4825
|
+
this.customStyleDefs.forEach((value, key) => {
|
|
4826
|
+
rules.push(key + " { " + value + " }");
|
|
4827
|
+
});
|
|
4828
|
+
// this.nodeStyle.innerHTML += "\n/* Custom styles */\n" + rules.join("\n");
|
|
4829
|
+
}
|
|
4822
4830
|
this.nodeStyle.innerHTML = rules.join("\n");
|
|
4823
4831
|
}
|
|
4824
4832
|
/**
|
|
@@ -4842,11 +4850,7 @@ class drawutilssvg {
|
|
|
4842
4850
|
* @param {Map<string,string>} defs
|
|
4843
4851
|
*/
|
|
4844
4852
|
addCustomStyleDefs(defs) {
|
|
4845
|
-
|
|
4846
|
-
defs.forEach((value, key) => {
|
|
4847
|
-
buffer.push(key + " { " + value + " }");
|
|
4848
|
-
});
|
|
4849
|
-
this.nodeStyle.innerHTML += "\n/* Custom styles */\n" + buffer.join("\n");
|
|
4853
|
+
this.customStyleDefs = defs;
|
|
4850
4854
|
}
|
|
4851
4855
|
/**
|
|
4852
4856
|
* Retieve an old (cached) element.
|
|
@@ -10893,8 +10897,9 @@ VEllipseSector.ellipseSectorUtils = {
|
|
|
10893
10897
|
* @modified 2023-02-10 Adding `enableZoom` and `enablePan` (both default true) to have the option to disable these functions.
|
|
10894
10898
|
* @modified 2023-09-29 Adding proper dicionary key and value types to the params of `PlotBoilerplate.utils.safeMergeByKeys` (was `object` before).
|
|
10895
10899
|
* @modified 2024-07-08 Adding `PlotBoilerplate.getGUI()` to retrieve the GUI instance.
|
|
10900
|
+
* @modified 2024-08-25 Extending main class `PlotBoilerplate` optional param `isBackdropFiltersEnabled`.
|
|
10896
10901
|
*
|
|
10897
|
-
* @version 1.
|
|
10902
|
+
* @version 1.19.0
|
|
10898
10903
|
*
|
|
10899
10904
|
* @file PlotBoilerplate
|
|
10900
10905
|
* @fileoverview The main class.
|
|
@@ -11077,7 +11082,8 @@ class PlotBoilerplate {
|
|
|
11077
11082
|
enableZoom: f.bool(config, "enableZoom", true), // default=true
|
|
11078
11083
|
enablePan: f.bool(config, "enablePan", true), // default=true
|
|
11079
11084
|
// Experimental (and unfinished)
|
|
11080
|
-
enableGL: f.bool(config, "enableGL", false)
|
|
11085
|
+
enableGL: f.bool(config, "enableGL", false),
|
|
11086
|
+
isBackdropFiltersEnabled: f.bool(config, "isBackdropFiltersEnabled", true)
|
|
11081
11087
|
}; // END confog
|
|
11082
11088
|
/**
|
|
11083
11089
|
* Configuration for drawing things.
|