@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 +39 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +39 -9
- package/dist/index.js.map +1 -1
- package/dist/index.umd.min.js +4 -4
- package/dist/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/types/components/index.d.ts +0 -1
- package/types/components/index.d.ts.map +1 -1
- package/types/css/interfaces.d.ts +4 -0
- package/types/css/interfaces.d.ts.map +1 -1
- package/types/display-objects/DisplayObject.d.ts +10 -0
- package/types/display-objects/DisplayObject.d.ts.map +1 -1
- package/types/dom/Element.d.ts +1 -6
- package/types/dom/Element.d.ts.map +1 -1
- package/types/components/RBushNode.d.ts +0 -22
- package/types/components/RBushNode.d.ts.map +0 -1
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.
|
|
5
|
-
* @date 12/
|
|
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
|
*/
|
|
@@ -12004,13 +12004,6 @@ var Element = /*#__PURE__*/function (_Node) {
|
|
|
12004
12004
|
dirtyChildren: [],
|
|
12005
12005
|
dirtyReason: undefined
|
|
12006
12006
|
};
|
|
12007
|
-
/**
|
|
12008
|
-
* @deprecated Legacy property for RBush spatial indexing.
|
|
12009
|
-
* Will be removed in future versions.
|
|
12010
|
-
*/
|
|
12011
|
-
_this.rBushNode = {
|
|
12012
|
-
aabb: undefined
|
|
12013
|
-
};
|
|
12014
12007
|
/**
|
|
12015
12008
|
* https://developer.mozilla.org/zh-CN/docs/Web/API/Element/namespaceURI
|
|
12016
12009
|
*/
|
|
@@ -12822,6 +12815,35 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
|
|
|
12822
12815
|
}
|
|
12823
12816
|
}
|
|
12824
12817
|
|
|
12818
|
+
/**
|
|
12819
|
+
* batch update attributes without attributeChangedCallback, for performance
|
|
12820
|
+
* use with caution
|
|
12821
|
+
* @param attributes
|
|
12822
|
+
* @param parseOptions
|
|
12823
|
+
* @experimental
|
|
12824
|
+
*/
|
|
12825
|
+
}, {
|
|
12826
|
+
key: "setAttributes",
|
|
12827
|
+
value: function setAttributes(attributes) {
|
|
12828
|
+
var parseOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12829
|
+
var _parseOptions$skipDis = parseOptions.skipDispatchAttrModifiedEvent,
|
|
12830
|
+
skipDispatchAttrModifiedEvent = _parseOptions$skipDis === void 0 ? false : _parseOptions$skipDis;
|
|
12831
|
+
var oldAttributes;
|
|
12832
|
+
var oldParsedValues;
|
|
12833
|
+
if (!skipDispatchAttrModifiedEvent) {
|
|
12834
|
+
oldAttributes = _objectSpread({}, this.attributes);
|
|
12835
|
+
oldParsedValues = _objectSpread({}, this.parsedStyle);
|
|
12836
|
+
}
|
|
12837
|
+
runtime.styleValueRegistry.processProperties(this, attributes, parseOptions);
|
|
12838
|
+
// redraw at next frame
|
|
12839
|
+
this.dirty();
|
|
12840
|
+
if (!skipDispatchAttrModifiedEvent) {
|
|
12841
|
+
for (var key in attributes) {
|
|
12842
|
+
this.dispatchAttrModifiedEvent(key, oldAttributes[key], attributes[key], oldParsedValues[key]);
|
|
12843
|
+
}
|
|
12844
|
+
}
|
|
12845
|
+
}
|
|
12846
|
+
|
|
12825
12847
|
/**
|
|
12826
12848
|
* called when attributes get changed or initialized
|
|
12827
12849
|
*/
|
|
@@ -12835,6 +12857,14 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
|
|
|
12835
12857
|
|
|
12836
12858
|
// redraw at next frame
|
|
12837
12859
|
this.dirty();
|
|
12860
|
+
|
|
12861
|
+
// return;
|
|
12862
|
+
|
|
12863
|
+
this.dispatchAttrModifiedEvent(name, oldValue, value, oldParsedValue);
|
|
12864
|
+
}
|
|
12865
|
+
}, {
|
|
12866
|
+
key: "dispatchAttrModifiedEvent",
|
|
12867
|
+
value: function dispatchAttrModifiedEvent(name, oldValue, value, oldParsedValue) {
|
|
12838
12868
|
var newParsedValue = this.parsedStyle[name];
|
|
12839
12869
|
if (this.isConnected) {
|
|
12840
12870
|
attrModifiedEvent.relatedNode = this;
|