@antv/g-lite 2.0.11-alpha.4 → 2.0.11-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +11 -11
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/dist/utils/canvas.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -7480,20 +7480,19 @@ var CSSPropertyTextTransform = /** @class */ (function () {
|
|
|
7480
7480
|
return CSSPropertyTextTransform;
|
|
7481
7481
|
}());
|
|
7482
7482
|
|
|
7483
|
-
var
|
|
7484
|
-
var defaultCanvasIdCounter = 0;
|
|
7483
|
+
var CANVAS_Map = new WeakMap();
|
|
7485
7484
|
/**
|
|
7486
7485
|
* destroy existed canvas with the same id
|
|
7487
7486
|
*/
|
|
7488
7487
|
function cleanExistedCanvas(container, canvas, fast) {
|
|
7489
7488
|
if (container) {
|
|
7490
|
-
var
|
|
7491
|
-
? container
|
|
7492
|
-
: container
|
|
7493
|
-
if (
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7489
|
+
var $dom = typeof container === 'string'
|
|
7490
|
+
? document.getElementById(container)
|
|
7491
|
+
: container;
|
|
7492
|
+
if (CANVAS_Map.has($dom))
|
|
7493
|
+
CANVAS_Map.get($dom).destroy(true, !!fast);
|
|
7494
|
+
else
|
|
7495
|
+
CANVAS_Map.set($dom, canvas);
|
|
7497
7496
|
}
|
|
7498
7497
|
}
|
|
7499
7498
|
var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
@@ -15083,9 +15082,10 @@ var Canvas = /** @class */ (function (_super) {
|
|
|
15083
15082
|
// unmount all children
|
|
15084
15083
|
var root = this.getRoot();
|
|
15085
15084
|
this.unmountChildren(root);
|
|
15086
|
-
if (cleanUp
|
|
15085
|
+
if (cleanUp) {
|
|
15087
15086
|
// destroy Document
|
|
15088
|
-
|
|
15087
|
+
if (!fastCleanExistingCanvas)
|
|
15088
|
+
this.document.destroy();
|
|
15089
15089
|
this.getEventService().destroy();
|
|
15090
15090
|
}
|
|
15091
15091
|
// destroy services
|