@antv/g-lite 2.2.6 → 2.2.7

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.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /*!
2
2
  * @antv/g-lite
3
3
  * @description A core module for rendering engine implements DOM API.
4
- * @version 2.2.6
5
- * @date 11/25/2024, 1:44:49 PM
4
+ * @version 2.2.7
5
+ * @date 11/27/2024, 9:20:36 AM
6
6
  * @author AntVis
7
7
  * @docs https://g.antv.antgroup.com/
8
8
  */
@@ -15569,14 +15569,14 @@ var Canvas = /*#__PURE__*/function (_EventTarget) {
15569
15569
  }
15570
15570
 
15571
15571
  /**
15572
- * `cleanUp` means clean all the internal services of Canvas which happens when calling `canvas.destroy()`.
15572
+ * @param cleanUp - whether to clean up all the internal services of Canvas
15573
+ * @param skipTriggerEvent - whether to skip trigger destroy event
15573
15574
  */
15574
15575
  }, {
15575
15576
  key: "destroy",
15576
15577
  value: function destroy() {
15577
15578
  var cleanUp = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
15578
15579
  var skipTriggerEvent = arguments.length > 1 ? arguments[1] : undefined;
15579
- if (skipTriggerEvent === undefined) skipTriggerEvent = this.getConfig().fastCleanExistingCanvas;
15580
15580
  if (!skipTriggerEvent) {
15581
15581
  this.dispatchEvent(new CustomEvent(CanvasEvent.BEFORE_DESTROY));
15582
15582
  }
@@ -15586,8 +15586,8 @@ var Canvas = /*#__PURE__*/function (_EventTarget) {
15586
15586
 
15587
15587
  // unmount all children
15588
15588
  var root = this.getRoot();
15589
- this.unmountChildren(root);
15590
15589
  if (cleanUp) {
15590
+ this.unmountChildren(root);
15591
15591
  // destroy Document
15592
15592
  this.document.destroy();
15593
15593
  this.getEventService().destroy();
@@ -15597,8 +15597,8 @@ var Canvas = /*#__PURE__*/function (_EventTarget) {
15597
15597
  this.getRenderingService().destroy();
15598
15598
  this.getContextService().destroy();
15599
15599
 
15600
- // clear root after renderservice destroyed
15601
- if (cleanUp && this.context.rBushRoot) {
15600
+ // clear root after render service destroyed
15601
+ if (this.context.rBushRoot) {
15602
15602
  // clear rbush
15603
15603
  this.context.rBushRoot.clear();
15604
15604
  this.context.rBushRoot = null;