@antv/g-lite 2.5.0 → 2.5.1

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
@@ -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.5.0
5
- * @date 12/10/2025, 8:42:24 AM
4
+ * @version 2.5.1
5
+ * @date 12/12/2025, 3:28:41 AM
6
6
  * @author AntVis
7
7
  * @docs https://g.antv.antgroup.com/
8
8
  */
@@ -11214,18 +11214,26 @@ var DefaultSceneGraphService = /*#__PURE__*/function () {
11214
11214
  }, {
11215
11215
  key: "notifyMutationObservers",
11216
11216
  value: function notifyMutationObservers(canvas) {
11217
- var mutations = [];
11217
+ var mutations = new Set();
11218
11218
  canvas.getRoot().forEach(function (item) {
11219
11219
  (item.mutations || []).forEach(function (mutation) {
11220
11220
  if (mutation.type === 'attributes' && mutation._boundsChangeData) {
11221
- mutations.push(mutation);
11221
+ if (mutation._boundsChangeData.affectChildren) {
11222
+ item.forEach(function (node) {
11223
+ var newMutation = _objectSpread({}, mutation);
11224
+ newMutation.target = node;
11225
+ mutations.add(newMutation);
11226
+ });
11227
+ } else {
11228
+ mutations.add(mutation);
11229
+ }
11222
11230
  }
11223
11231
  });
11224
11232
  item.mutations = undefined;
11225
11233
  });
11226
- if (mutations.length > 0) {
11234
+ if (mutations.size > 0) {
11227
11235
  var event = new CustomEvent(ElementEvent.BOUNDS_CHANGED, {
11228
- detail: mutations
11236
+ detail: Array.from(mutations)
11229
11237
  });
11230
11238
  canvas.dispatchEvent(event, true, true);
11231
11239
  }