@antv/g-lite 2.6.0 → 2.7.0

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.6.0
5
- * @date 12/22/2025, 3:02:41 AM
4
+ * @version 2.7.0
5
+ * @date 12/24/2025, 11:55:20 AM
6
6
  * @author AntVis
7
7
  * @docs https://g.antv.antgroup.com/
8
8
  */
@@ -12002,13 +12002,6 @@ var Element = /*#__PURE__*/function (_Node) {
12002
12002
  dirtyChildren: [],
12003
12003
  dirtyReason: undefined
12004
12004
  };
12005
- /**
12006
- * @deprecated Legacy property for RBush spatial indexing.
12007
- * Will be removed in future versions.
12008
- */
12009
- _this.rBushNode = {
12010
- aabb: undefined
12011
- };
12012
12005
  /**
12013
12006
  * https://developer.mozilla.org/zh-CN/docs/Web/API/Element/namespaceURI
12014
12007
  */
@@ -12820,6 +12813,35 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
12820
12813
  }
12821
12814
  }
12822
12815
 
12816
+ /**
12817
+ * batch update attributes without attributeChangedCallback, for performance
12818
+ * use with caution
12819
+ * @param attributes
12820
+ * @param parseOptions
12821
+ * @experimental
12822
+ */
12823
+ }, {
12824
+ key: "setAttributes",
12825
+ value: function setAttributes(attributes) {
12826
+ var parseOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12827
+ var _parseOptions$skipDis = parseOptions.skipDispatchAttrModifiedEvent,
12828
+ skipDispatchAttrModifiedEvent = _parseOptions$skipDis === void 0 ? false : _parseOptions$skipDis;
12829
+ var oldAttributes;
12830
+ var oldParsedValues;
12831
+ if (!skipDispatchAttrModifiedEvent) {
12832
+ oldAttributes = _objectSpread({}, this.attributes);
12833
+ oldParsedValues = _objectSpread({}, this.parsedStyle);
12834
+ }
12835
+ runtime.styleValueRegistry.processProperties(this, attributes, parseOptions);
12836
+ // redraw at next frame
12837
+ this.dirty();
12838
+ if (!skipDispatchAttrModifiedEvent) {
12839
+ for (var key in attributes) {
12840
+ this.dispatchAttrModifiedEvent(key, oldAttributes[key], attributes[key], oldParsedValues[key]);
12841
+ }
12842
+ }
12843
+ }
12844
+
12823
12845
  /**
12824
12846
  * called when attributes get changed or initialized
12825
12847
  */
@@ -12833,6 +12855,14 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
12833
12855
 
12834
12856
  // redraw at next frame
12835
12857
  this.dirty();
12858
+
12859
+ // return;
12860
+
12861
+ this.dispatchAttrModifiedEvent(name, oldValue, value, oldParsedValue);
12862
+ }
12863
+ }, {
12864
+ key: "dispatchAttrModifiedEvent",
12865
+ value: function dispatchAttrModifiedEvent(name, oldValue, value, oldParsedValue) {
12836
12866
  var newParsedValue = this.parsedStyle[name];
12837
12867
  if (this.isConnected) {
12838
12868
  attrModifiedEvent.relatedNode = this;