@antv/g-lite 2.6.0 → 2.7.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 +54 -14
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +54 -14
- package/dist/index.js.map +1 -1
- package/dist/index.umd.min.js +5 -5
- 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/plugins/PrepareRendererPlugin.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
|
|
4
|
+
* @version 2.7.1
|
|
5
|
+
* @date 10/10/2026, 9:45:35 AM
|
|
6
6
|
* @author AntVis
|
|
7
7
|
* @docs https://g.antv.antgroup.com/
|
|
8
8
|
*/
|
|
@@ -3077,7 +3077,7 @@ var CSSStyleValue = /*#__PURE__*/function () {
|
|
|
3077
3077
|
// type === UnitType.kChs ||
|
|
3078
3078
|
// this.isViewportPercentageLength(type) ||
|
|
3079
3079
|
// this.isContainerPercentageLength(type)
|
|
3080
|
-
|
|
3080
|
+
;
|
|
3081
3081
|
}
|
|
3082
3082
|
}, {
|
|
3083
3083
|
key: "isTime",
|
|
@@ -8234,7 +8234,7 @@ var FederatedEvent = /*#__PURE__*/function () {
|
|
|
8234
8234
|
}]);
|
|
8235
8235
|
}();
|
|
8236
8236
|
|
|
8237
|
-
var FederatedMouseEvent = /*#__PURE__*/function (
|
|
8237
|
+
var FederatedMouseEvent = /*#__PURE__*/function (_FederatedEvent) {
|
|
8238
8238
|
function FederatedMouseEvent() {
|
|
8239
8239
|
var _this;
|
|
8240
8240
|
_classCallCheck(this, FederatedMouseEvent);
|
|
@@ -8273,7 +8273,7 @@ var FederatedMouseEvent = /*#__PURE__*/function (_ref) {
|
|
|
8273
8273
|
_this.screen = new Point();
|
|
8274
8274
|
return _this;
|
|
8275
8275
|
}
|
|
8276
|
-
_inherits(FederatedMouseEvent,
|
|
8276
|
+
_inherits(FederatedMouseEvent, _FederatedEvent);
|
|
8277
8277
|
return _createClass(FederatedMouseEvent, [{
|
|
8278
8278
|
key: "clientX",
|
|
8279
8279
|
get: function get() {
|
|
@@ -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;
|
|
@@ -15458,10 +15488,20 @@ var PrepareRendererPlugin = /*#__PURE__*/function () {
|
|
|
15458
15488
|
renderingService.dirty();
|
|
15459
15489
|
};
|
|
15460
15490
|
var handleBoundsChanged = function handleBoundsChanged(e) {
|
|
15461
|
-
var _this$mutationRecords;
|
|
15462
15491
|
var records = e.detail;
|
|
15463
15492
|
// Store mutation records for potential future processing
|
|
15464
|
-
|
|
15493
|
+
var _iterator = _createForOfIteratorHelper(records),
|
|
15494
|
+
_step;
|
|
15495
|
+
try {
|
|
15496
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
15497
|
+
var record = _step.value;
|
|
15498
|
+
_this.mutationRecords.push(record);
|
|
15499
|
+
}
|
|
15500
|
+
} catch (err) {
|
|
15501
|
+
_iterator.e(err);
|
|
15502
|
+
} finally {
|
|
15503
|
+
_iterator.f();
|
|
15504
|
+
}
|
|
15465
15505
|
renderingService.dirty();
|
|
15466
15506
|
};
|
|
15467
15507
|
var handleMounted = function handleMounted(e) {
|