@antv/g-lite 1.3.0-next.15 → 1.3.0-next.16

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 CHANGED
@@ -11647,16 +11647,7 @@ var entityCounter = 0;
11647
11647
  function resetEntityCounter() {
11648
11648
  entityCounter = 0;
11649
11649
  }
11650
- // const insertedEvent = new MutationEvent(
11651
- // ElementEvent.INSERTED,
11652
- // null,
11653
- // '',
11654
- // '',
11655
- // '',
11656
- // 0,
11657
- // '',
11658
- // '',
11659
- // );
11650
+ var insertedEvent = new MutationEvent(ElementEvent.INSERTED, null, '', '', '', 0, '', '');
11660
11651
  var removedEvent = new MutationEvent(ElementEvent.REMOVED, null, '', '', '', 0, '', '');
11661
11652
  var destroyEvent = new CustomEvent(ElementEvent.DESTROY);
11662
11653
  /**
@@ -11896,8 +11887,11 @@ var Element = /** @class */ (function (_super) {
11896
11887
  if ((_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView) {
11897
11888
  this.ownerDocument.defaultView.mountChildren(child);
11898
11889
  }
11899
- // insertedEvent.relatedNode = this as IElement;
11900
- // child.dispatchEvent(insertedEvent);
11890
+ // @ts-ignore
11891
+ if (this.isMutationObserved) {
11892
+ insertedEvent.relatedNode = this;
11893
+ child.dispatchEvent(insertedEvent);
11894
+ }
11901
11895
  return child;
11902
11896
  };
11903
11897
  Element.prototype.insertBefore = function (newChild, refChild) {