@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.js CHANGED
@@ -11668,16 +11668,7 @@ var entityCounter = 0;
11668
11668
  function resetEntityCounter() {
11669
11669
  entityCounter = 0;
11670
11670
  }
11671
- // const insertedEvent = new MutationEvent(
11672
- // ElementEvent.INSERTED,
11673
- // null,
11674
- // '',
11675
- // '',
11676
- // '',
11677
- // 0,
11678
- // '',
11679
- // '',
11680
- // );
11671
+ var insertedEvent = new MutationEvent(exports.ElementEvent.INSERTED, null, '', '', '', 0, '', '');
11681
11672
  var removedEvent = new MutationEvent(exports.ElementEvent.REMOVED, null, '', '', '', 0, '', '');
11682
11673
  var destroyEvent = new CustomEvent(exports.ElementEvent.DESTROY);
11683
11674
  /**
@@ -11917,8 +11908,11 @@ var Element = /** @class */ (function (_super) {
11917
11908
  if ((_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView) {
11918
11909
  this.ownerDocument.defaultView.mountChildren(child);
11919
11910
  }
11920
- // insertedEvent.relatedNode = this as IElement;
11921
- // child.dispatchEvent(insertedEvent);
11911
+ // @ts-ignore
11912
+ if (this.isMutationObserved) {
11913
+ insertedEvent.relatedNode = this;
11914
+ child.dispatchEvent(insertedEvent);
11915
+ }
11922
11916
  return child;
11923
11917
  };
11924
11918
  Element.prototype.insertBefore = function (newChild, refChild) {