@antv/g-lite 2.2.1 → 2.2.2
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 +28 -10
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +28 -10
- 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/css/StyleValueRegistry.d.ts +1 -1
- package/types/css/StyleValueRegistry.d.ts.map +1 -1
- package/types/display-objects/Circle.d.ts +1 -0
- package/types/display-objects/Circle.d.ts.map +1 -1
- package/types/display-objects/CustomElement.d.ts.map +1 -1
- package/types/display-objects/DisplayObject.d.ts +1 -0
- package/types/display-objects/DisplayObject.d.ts.map +1 -1
- package/types/display-objects/Ellipse.d.ts +1 -0
- package/types/display-objects/Ellipse.d.ts.map +1 -1
- package/types/display-objects/Group.d.ts +1 -0
- package/types/display-objects/Group.d.ts.map +1 -1
- package/types/display-objects/HTML.d.ts +1 -0
- package/types/display-objects/HTML.d.ts.map +1 -1
- package/types/display-objects/Image.d.ts +1 -0
- package/types/display-objects/Image.d.ts.map +1 -1
- package/types/display-objects/Line.d.ts +1 -0
- package/types/display-objects/Line.d.ts.map +1 -1
- package/types/display-objects/Path.d.ts +1 -0
- package/types/display-objects/Path.d.ts.map +1 -1
- package/types/display-objects/Polygon.d.ts +1 -0
- package/types/display-objects/Polygon.d.ts.map +1 -1
- package/types/display-objects/Polyline.d.ts +1 -0
- package/types/display-objects/Polyline.d.ts.map +1 -1
- package/types/display-objects/Rect.d.ts +1 -0
- package/types/display-objects/Rect.d.ts.map +1 -1
- package/types/display-objects/Text.d.ts +1 -0
- package/types/display-objects/Text.d.ts.map +1 -1
- package/types/global-runtime.d.ts +5 -0
- package/types/global-runtime.d.ts.map +1 -1
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.2.
|
|
5
|
-
* @date 11/
|
|
4
|
+
* @version 2.2.2
|
|
5
|
+
* @date 11/7/2024, 7:43:00 AM
|
|
6
6
|
* @author AntVis
|
|
7
7
|
* @docs https://g.antv.antgroup.com/
|
|
8
8
|
*/
|
|
@@ -6371,7 +6371,7 @@ var DefaultStyleValueRegistry = /*#__PURE__*/function () {
|
|
|
6371
6371
|
// clipPath
|
|
6372
6372
|
var oldClipPath = object.parsedStyle.clipPath;
|
|
6373
6373
|
var oldOffsetPath = object.parsedStyle.offsetPath;
|
|
6374
|
-
|
|
6374
|
+
assignParsedStyle(object, attributes);
|
|
6375
6375
|
var needUpdateGeometry = !!options.forceUpdateGeometry;
|
|
6376
6376
|
if (!needUpdateGeometry) {
|
|
6377
6377
|
for (var i in attributes) {
|
|
@@ -6632,6 +6632,18 @@ var DefaultStyleValueRegistry = /*#__PURE__*/function () {
|
|
|
6632
6632
|
}
|
|
6633
6633
|
}]);
|
|
6634
6634
|
}();
|
|
6635
|
+
function assignParsedStyle(object, attributes) {
|
|
6636
|
+
if (!runtime.enableMassiveParsedStyleAssignOptimization) {
|
|
6637
|
+
Object.assign(object.parsedStyle, attributes);
|
|
6638
|
+
return;
|
|
6639
|
+
}
|
|
6640
|
+
var list = object.constructor.PARSED_STYLE_LIST;
|
|
6641
|
+
for (var key in attributes) {
|
|
6642
|
+
if (list.has(key)) {
|
|
6643
|
+
object.parsedStyle[key] = attributes[key];
|
|
6644
|
+
}
|
|
6645
|
+
}
|
|
6646
|
+
}
|
|
6635
6647
|
|
|
6636
6648
|
var CSSPropertyAngle = /*#__PURE__*/function () {
|
|
6637
6649
|
function CSSPropertyAngle() {
|
|
@@ -11602,7 +11614,7 @@ var runtime = {};
|
|
|
11602
11614
|
var geometryUpdaterFactory = function (_ref) {
|
|
11603
11615
|
var rectUpdater = new RectUpdater();
|
|
11604
11616
|
var polylineUpdater = new PolylineUpdater();
|
|
11605
|
-
return _ref = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, Shape.CIRCLE, new CircleUpdater()), Shape.ELLIPSE, new EllipseUpdater()), Shape.RECT, rectUpdater), Shape.IMAGE, rectUpdater), Shape.GROUP, new GroupUpdater()), Shape.LINE, new LineUpdater()), Shape.TEXT, new TextUpdater(runtime)), Shape.POLYLINE, polylineUpdater), Shape.POLYGON, polylineUpdater), Shape.PATH, new PathUpdater()),
|
|
11617
|
+
return _ref = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, Shape.FRAGMENT, null), Shape.CIRCLE, new CircleUpdater()), Shape.ELLIPSE, new EllipseUpdater()), Shape.RECT, rectUpdater), Shape.IMAGE, rectUpdater), Shape.GROUP, new GroupUpdater()), Shape.LINE, new LineUpdater()), Shape.TEXT, new TextUpdater(runtime)), Shape.POLYLINE, polylineUpdater), Shape.POLYGON, polylineUpdater), _defineProperty(_defineProperty(_defineProperty(_ref, Shape.PATH, new PathUpdater()), Shape.HTML, new HTMLUpdater()), Shape.MESH, null);
|
|
11606
11618
|
}();
|
|
11607
11619
|
var CSSPropertySyntaxFactory = function (_ref2) {
|
|
11608
11620
|
var color = new CSSPropertyColor();
|
|
@@ -12359,9 +12371,6 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
|
|
|
12359
12371
|
|
|
12360
12372
|
// assign name, id to config
|
|
12361
12373
|
// eg. group.get('name')
|
|
12362
|
-
/**
|
|
12363
|
-
* contains style props in constructor's params, eg. fill, stroke...
|
|
12364
|
-
*/
|
|
12365
12374
|
_this.isCustomElement = false;
|
|
12366
12375
|
_this.isMutationObserved = false;
|
|
12367
12376
|
/**
|
|
@@ -13157,6 +13166,7 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
|
|
|
13157
13166
|
// #endregion deprecated
|
|
13158
13167
|
}]);
|
|
13159
13168
|
}(Element);
|
|
13169
|
+
DisplayObject.PARSED_STYLE_LIST = new Set(['class', 'className', 'clipPath', 'cursor', 'display', 'draggable', 'droppable', 'fill', 'fillOpacity', 'fillRule', 'filter', 'increasedLineWidthForHitTesting', 'lineCap', 'lineDash', 'lineDashOffset', 'lineJoin', 'lineWidth', 'miterLimit', 'hitArea', 'offsetDistance', 'offsetPath', 'offsetX', 'offsetY', 'opacity', 'pointerEvents', 'shadowColor', 'shadowType', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY', 'stroke', 'strokeOpacity', 'strokeWidth', 'strokeLinecap', 'strokeLineJoin', 'strokeDasharray', 'strokeDashoffset', 'transform', 'transformOrigin', 'textTransform', 'visibility', 'zIndex']);
|
|
13160
13170
|
|
|
13161
13171
|
var Circle = /*#__PURE__*/function (_DisplayObject) {
|
|
13162
13172
|
function Circle() {
|
|
@@ -13169,6 +13179,7 @@ var Circle = /*#__PURE__*/function (_DisplayObject) {
|
|
|
13169
13179
|
_inherits(Circle, _DisplayObject);
|
|
13170
13180
|
return _createClass(Circle);
|
|
13171
13181
|
}(DisplayObject);
|
|
13182
|
+
Circle.PARSED_STYLE_LIST = new Set([].concat(_toConsumableArray(DisplayObject.PARSED_STYLE_LIST), ['cx', 'cy', 'cz', 'r', 'isBillboard', 'isSizeAttenuation']));
|
|
13172
13183
|
|
|
13173
13184
|
var _excluded$6 = ["style"];
|
|
13174
13185
|
/**
|
|
@@ -13187,9 +13198,6 @@ var CustomElement = /*#__PURE__*/function (_DisplayObject) {
|
|
|
13187
13198
|
_this = _callSuper(this, CustomElement, [_objectSpread({
|
|
13188
13199
|
style: style
|
|
13189
13200
|
}, rest)]);
|
|
13190
|
-
// static get observedAttributes(): string[] {
|
|
13191
|
-
// return [];
|
|
13192
|
-
// }
|
|
13193
13201
|
_this.isCustomElement = true;
|
|
13194
13202
|
return _this;
|
|
13195
13203
|
}
|
|
@@ -13212,6 +13220,7 @@ var Ellipse = /*#__PURE__*/function (_DisplayObject) {
|
|
|
13212
13220
|
_inherits(Ellipse, _DisplayObject);
|
|
13213
13221
|
return _createClass(Ellipse);
|
|
13214
13222
|
}(DisplayObject);
|
|
13223
|
+
Ellipse.PARSED_STYLE_LIST = new Set([].concat(_toConsumableArray(DisplayObject.PARSED_STYLE_LIST), ['cx', 'cy', 'cz', 'rx', 'ry', 'isBillboard', 'isSizeAttenuation']));
|
|
13215
13224
|
|
|
13216
13225
|
/**
|
|
13217
13226
|
* 节点片段,用于包裹多个节点并批量操作
|
|
@@ -13254,6 +13263,7 @@ var Group = /*#__PURE__*/function (_DisplayObject) {
|
|
|
13254
13263
|
_inherits(Group, _DisplayObject);
|
|
13255
13264
|
return _createClass(Group);
|
|
13256
13265
|
}(DisplayObject);
|
|
13266
|
+
Group.PARSED_STYLE_LIST = new Set([].concat(_toConsumableArray(DisplayObject.PARSED_STYLE_LIST), ['width', 'height']));
|
|
13257
13267
|
|
|
13258
13268
|
var _excluded$5 = ["style"];
|
|
13259
13269
|
/**
|
|
@@ -13340,6 +13350,7 @@ var HTML = /*#__PURE__*/function (_DisplayObject) {
|
|
|
13340
13350
|
}
|
|
13341
13351
|
}]);
|
|
13342
13352
|
}(DisplayObject);
|
|
13353
|
+
HTML.PARSED_STYLE_LIST = new Set([].concat(_toConsumableArray(DisplayObject.PARSED_STYLE_LIST), ['x', 'y', '$el', 'innerHTML', 'width', 'height']));
|
|
13343
13354
|
|
|
13344
13355
|
var Image = /*#__PURE__*/function (_DisplayObject) {
|
|
13345
13356
|
function Image() {
|
|
@@ -13352,6 +13363,7 @@ var Image = /*#__PURE__*/function (_DisplayObject) {
|
|
|
13352
13363
|
_inherits(Image, _DisplayObject);
|
|
13353
13364
|
return _createClass(Image);
|
|
13354
13365
|
}(DisplayObject);
|
|
13366
|
+
Image.PARSED_STYLE_LIST = new Set([].concat(_toConsumableArray(DisplayObject.PARSED_STYLE_LIST), ['x', 'y', 'z', 'src', 'width', 'height', 'isBillboard', 'billboardRotation', 'isSizeAttenuation', 'keepAspectRatio']));
|
|
13355
13367
|
|
|
13356
13368
|
var _excluded$4 = ["style"];
|
|
13357
13369
|
/**
|
|
@@ -13507,6 +13519,7 @@ var Line = /*#__PURE__*/function (_DisplayObject) {
|
|
|
13507
13519
|
}
|
|
13508
13520
|
}]);
|
|
13509
13521
|
}(DisplayObject);
|
|
13522
|
+
Line.PARSED_STYLE_LIST = new Set([].concat(_toConsumableArray(DisplayObject.PARSED_STYLE_LIST), ['x1', 'y1', 'x2', 'y2', 'z1', 'z2', 'isBillboard', 'isSizeAttenuation', 'markerStart', 'markerEnd', 'markerStartOffset', 'markerEndOffset']));
|
|
13510
13523
|
|
|
13511
13524
|
var _excluded$3 = ["style"];
|
|
13512
13525
|
var Path = /*#__PURE__*/function (_DisplayObject) {
|
|
@@ -13745,6 +13758,7 @@ var Path = /*#__PURE__*/function (_DisplayObject) {
|
|
|
13745
13758
|
}
|
|
13746
13759
|
}]);
|
|
13747
13760
|
}(DisplayObject);
|
|
13761
|
+
Path.PARSED_STYLE_LIST = new Set([].concat(_toConsumableArray(DisplayObject.PARSED_STYLE_LIST), ['d', 'markerStart', 'markerMid', 'markerEnd', 'markerStartOffset', 'markerEndOffset', 'isBillboard', 'isSizeAttenuation']));
|
|
13748
13762
|
|
|
13749
13763
|
var _excluded$2 = ["style"];
|
|
13750
13764
|
var Polygon = /*#__PURE__*/function (_DisplayObject) {
|
|
@@ -13906,6 +13920,7 @@ var Polygon = /*#__PURE__*/function (_DisplayObject) {
|
|
|
13906
13920
|
}
|
|
13907
13921
|
}]);
|
|
13908
13922
|
}(DisplayObject);
|
|
13923
|
+
Polygon.PARSED_STYLE_LIST = new Set([].concat(_toConsumableArray(DisplayObject.PARSED_STYLE_LIST), ['points', 'markerStart', 'markerMid', 'markerEnd', 'markerStartOffset', 'markerEndOffset', 'isClosed', 'isBillboard', 'isSizeAttenuation']));
|
|
13909
13924
|
|
|
13910
13925
|
var _excluded$1 = ["style"];
|
|
13911
13926
|
/**
|
|
@@ -14003,6 +14018,7 @@ var Polyline = /*#__PURE__*/function (_Polygon) {
|
|
|
14003
14018
|
}
|
|
14004
14019
|
}]);
|
|
14005
14020
|
}(Polygon);
|
|
14021
|
+
Polyline.PARSED_STYLE_LIST = new Set([].concat(_toConsumableArray(Polygon.PARSED_STYLE_LIST), ['points', 'markerStart', 'markerMid', 'markerEnd', 'markerStartOffset', 'markerEndOffset', 'isBillboard']));
|
|
14006
14022
|
|
|
14007
14023
|
var Rect = /*#__PURE__*/function (_DisplayObject) {
|
|
14008
14024
|
function Rect() {
|
|
@@ -14015,6 +14031,7 @@ var Rect = /*#__PURE__*/function (_DisplayObject) {
|
|
|
14015
14031
|
_inherits(Rect, _DisplayObject);
|
|
14016
14032
|
return _createClass(Rect);
|
|
14017
14033
|
}(DisplayObject);
|
|
14034
|
+
Rect.PARSED_STYLE_LIST = new Set([].concat(_toConsumableArray(DisplayObject.PARSED_STYLE_LIST), ['x', 'y', 'z', 'width', 'height', 'isBillboard', 'isSizeAttenuation', 'radius']));
|
|
14018
14035
|
|
|
14019
14036
|
var _excluded = ["style"];
|
|
14020
14037
|
/**
|
|
@@ -14067,6 +14084,7 @@ var Text = /*#__PURE__*/function (_DisplayObject) {
|
|
|
14067
14084
|
}
|
|
14068
14085
|
}]);
|
|
14069
14086
|
}(DisplayObject);
|
|
14087
|
+
Text.PARSED_STYLE_LIST = new Set([].concat(_toConsumableArray(DisplayObject.PARSED_STYLE_LIST), ['x', 'y', 'z', 'isBillboard', 'billboardRotation', 'isSizeAttenuation', 'text', 'textAlign', 'textBaseline', 'fontStyle', 'fontSize', 'fontFamily', 'fontWeight', 'fontVariant', 'lineHeight', 'letterSpacing', 'leading', 'wordWrap', 'wordWrapWidth', 'maxLines', 'textOverflow', 'isOverflowing', 'textPath', 'textDecorationLine', 'textDecorationColor', 'textDecorationStyle', 'textPathSide', 'textPathStartOffset', 'metrics', 'dx', 'dy']));
|
|
14070
14088
|
|
|
14071
14089
|
/**
|
|
14072
14090
|
* canvas.customElements
|