@antv/g-lite 2.2.4 → 2.2.6
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 +29 -29
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +29 -29
- 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/Group.d.ts.map +1 -1
- package/types/global-runtime.d.ts +0 -5
- package/types/global-runtime.d.ts.map +1 -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.2.
|
|
5
|
-
* @date 11/
|
|
4
|
+
* @version 2.2.6
|
|
5
|
+
* @date 11/25/2024, 1:44:49 PM
|
|
6
6
|
* @author AntVis
|
|
7
7
|
* @docs https://g.antv.antgroup.com/
|
|
8
8
|
*/
|
|
@@ -6402,67 +6402,68 @@ var DefaultStyleValueRegistry = /*#__PURE__*/function () {
|
|
|
6402
6402
|
}
|
|
6403
6403
|
}
|
|
6404
6404
|
}
|
|
6405
|
-
|
|
6405
|
+
var list = getParsedStyleListOf(object);
|
|
6406
|
+
if (list.has('fill') && attributes.fill) {
|
|
6406
6407
|
object.parsedStyle.fill = parseColor(attributes.fill);
|
|
6407
6408
|
}
|
|
6408
|
-
if (attributes.stroke) {
|
|
6409
|
+
if (list.has('stroke') && attributes.stroke) {
|
|
6409
6410
|
object.parsedStyle.stroke = parseColor(attributes.stroke);
|
|
6410
6411
|
}
|
|
6411
|
-
if (attributes.shadowColor) {
|
|
6412
|
+
if (list.has('shadowColor') && attributes.shadowColor) {
|
|
6412
6413
|
object.parsedStyle.shadowColor = parseColor(attributes.shadowColor);
|
|
6413
6414
|
}
|
|
6414
|
-
if (attributes.filter) {
|
|
6415
|
+
if (list.has('filter') && attributes.filter) {
|
|
6415
6416
|
object.parsedStyle.filter = parseFilter(attributes.filter);
|
|
6416
6417
|
}
|
|
6417
6418
|
// Rect
|
|
6418
6419
|
// @ts-ignore
|
|
6419
|
-
if (!util.isNil(attributes.radius)) {
|
|
6420
|
+
if (list.has('radius') && !util.isNil(attributes.radius)) {
|
|
6420
6421
|
// @ts-ignore
|
|
6421
6422
|
object.parsedStyle.radius = parseDimensionArrayFormat(
|
|
6422
6423
|
// @ts-ignore
|
|
6423
6424
|
attributes.radius, 4);
|
|
6424
6425
|
}
|
|
6425
6426
|
// Polyline
|
|
6426
|
-
if (!util.isNil(attributes.lineDash)) {
|
|
6427
|
+
if (list.has('lineDash') && !util.isNil(attributes.lineDash)) {
|
|
6427
6428
|
object.parsedStyle.lineDash = parseDimensionArrayFormat(attributes.lineDash, 2);
|
|
6428
6429
|
}
|
|
6429
6430
|
// @ts-ignore
|
|
6430
|
-
if (attributes.points) {
|
|
6431
|
+
if (list.has('points') && attributes.points) {
|
|
6431
6432
|
// @ts-ignore
|
|
6432
6433
|
object.parsedStyle.points = parsePoints(attributes.points);
|
|
6433
6434
|
}
|
|
6434
6435
|
// Path
|
|
6435
6436
|
// @ts-ignore
|
|
6436
|
-
if (attributes.d === '') {
|
|
6437
|
+
if (list.has('d') && attributes.d === '') {
|
|
6437
6438
|
object.parsedStyle.d = _objectSpread({}, EMPTY_PARSED_PATH);
|
|
6438
6439
|
}
|
|
6439
6440
|
// @ts-ignore
|
|
6440
|
-
if (attributes.d) {
|
|
6441
|
+
if (list.has('d') && attributes.d) {
|
|
6441
6442
|
object.parsedStyle.d = parsePath(
|
|
6442
6443
|
// @ts-ignore
|
|
6443
6444
|
attributes.d);
|
|
6444
6445
|
}
|
|
6445
6446
|
// Text
|
|
6446
|
-
if (attributes.textTransform) {
|
|
6447
|
+
if (list.has('textTransform') && attributes.textTransform) {
|
|
6447
6448
|
this.runtime.CSSPropertySyntaxFactory[PropertySyntax.TEXT_TRANSFORM].calculator(null, null, {
|
|
6448
6449
|
value: attributes.textTransform
|
|
6449
6450
|
}, object, null);
|
|
6450
6451
|
}
|
|
6451
|
-
if (!util.isUndefined(attributes.clipPath)) {
|
|
6452
|
+
if (list.has('clipPath') && !util.isUndefined(attributes.clipPath)) {
|
|
6452
6453
|
this.runtime.CSSPropertySyntaxFactory[PropertySyntax.DEFINED_PATH].calculator('clipPath', oldClipPath, attributes.clipPath, object, this.runtime);
|
|
6453
6454
|
}
|
|
6454
|
-
if (attributes.offsetPath) {
|
|
6455
|
+
if (list.has('offsetPath') && attributes.offsetPath) {
|
|
6455
6456
|
this.runtime.CSSPropertySyntaxFactory[PropertySyntax.DEFINED_PATH].calculator('offsetPath', oldOffsetPath, attributes.offsetPath, object, this.runtime);
|
|
6456
6457
|
}
|
|
6457
|
-
if (attributes.transform) {
|
|
6458
|
+
if (list.has('transform') && attributes.transform) {
|
|
6458
6459
|
object.parsedStyle.transform = parseTransform(attributes.transform);
|
|
6459
6460
|
}
|
|
6460
|
-
if (attributes.transformOrigin) {
|
|
6461
|
+
if (list.has('transformOrigin') && attributes.transformOrigin) {
|
|
6461
6462
|
object.parsedStyle.transformOrigin = parseTransformOrigin(attributes.transformOrigin);
|
|
6462
6463
|
}
|
|
6463
6464
|
// Marker
|
|
6464
6465
|
// @ts-ignore
|
|
6465
|
-
if (attributes.markerStart) {
|
|
6466
|
+
if (list.has('markerStart') && attributes.markerStart) {
|
|
6466
6467
|
object.parsedStyle.markerStart = this.runtime.CSSPropertySyntaxFactory[PropertySyntax.MARKER].calculator(null,
|
|
6467
6468
|
// @ts-ignore
|
|
6468
6469
|
attributes.markerStart,
|
|
@@ -6470,7 +6471,7 @@ var DefaultStyleValueRegistry = /*#__PURE__*/function () {
|
|
|
6470
6471
|
attributes.markerStart, null, null);
|
|
6471
6472
|
}
|
|
6472
6473
|
// @ts-ignore
|
|
6473
|
-
if (attributes.markerEnd) {
|
|
6474
|
+
if (list.has('markerEnd') && attributes.markerEnd) {
|
|
6474
6475
|
object.parsedStyle.markerEnd = this.runtime.CSSPropertySyntaxFactory[PropertySyntax.MARKER].calculator(null,
|
|
6475
6476
|
// @ts-ignore
|
|
6476
6477
|
attributes.markerEnd,
|
|
@@ -6478,23 +6479,23 @@ var DefaultStyleValueRegistry = /*#__PURE__*/function () {
|
|
|
6478
6479
|
attributes.markerEnd, null, null);
|
|
6479
6480
|
}
|
|
6480
6481
|
// @ts-ignore
|
|
6481
|
-
if (attributes.markerMid) {
|
|
6482
|
+
if (list.has('markerMid') && attributes.markerMid) {
|
|
6482
6483
|
object.parsedStyle.markerMid = this.runtime.CSSPropertySyntaxFactory[PropertySyntax.MARKER].calculator('',
|
|
6483
6484
|
// @ts-ignore
|
|
6484
6485
|
attributes.markerMid,
|
|
6485
6486
|
// @ts-ignore
|
|
6486
6487
|
attributes.markerMid, null, null);
|
|
6487
6488
|
}
|
|
6488
|
-
if (!util.isNil(attributes.zIndex)) {
|
|
6489
|
+
if (list.has('zIndex') && !util.isNil(attributes.zIndex)) {
|
|
6489
6490
|
this.runtime.CSSPropertySyntaxFactory[PropertySyntax.Z_INDEX].postProcessor(object);
|
|
6490
6491
|
}
|
|
6491
|
-
if (!util.isNil(attributes.offsetDistance)) {
|
|
6492
|
+
if (list.has('offsetDistance') && !util.isNil(attributes.offsetDistance)) {
|
|
6492
6493
|
this.runtime.CSSPropertySyntaxFactory[PropertySyntax.OFFSET_DISTANCE].postProcessor(object);
|
|
6493
6494
|
}
|
|
6494
|
-
if (attributes.transform) {
|
|
6495
|
+
if (list.has('transform') && attributes.transform) {
|
|
6495
6496
|
this.runtime.CSSPropertySyntaxFactory[PropertySyntax.TRANSFORM].postProcessor(object);
|
|
6496
6497
|
}
|
|
6497
|
-
if (attributes.transformOrigin) {
|
|
6498
|
+
if (list.has('transformOrigin') && attributes.transformOrigin) {
|
|
6498
6499
|
this.runtime.CSSPropertySyntaxFactory[PropertySyntax.TRANSFORM_ORIGIN].postProcessor(object);
|
|
6499
6500
|
}
|
|
6500
6501
|
if (needUpdateGeometry) {
|
|
@@ -6654,17 +6655,16 @@ var DefaultStyleValueRegistry = /*#__PURE__*/function () {
|
|
|
6654
6655
|
}]);
|
|
6655
6656
|
}();
|
|
6656
6657
|
function assignParsedStyle(object, attributes) {
|
|
6657
|
-
|
|
6658
|
-
Object.assign(object.parsedStyle, attributes);
|
|
6659
|
-
return;
|
|
6660
|
-
}
|
|
6661
|
-
var list = object.constructor.PARSED_STYLE_LIST;
|
|
6658
|
+
var list = getParsedStyleListOf(object);
|
|
6662
6659
|
for (var key in attributes) {
|
|
6663
6660
|
if (list.has(key)) {
|
|
6664
6661
|
object.parsedStyle[key] = attributes[key];
|
|
6665
6662
|
}
|
|
6666
6663
|
}
|
|
6667
6664
|
}
|
|
6665
|
+
function getParsedStyleListOf(object) {
|
|
6666
|
+
return object.constructor.PARSED_STYLE_LIST;
|
|
6667
|
+
}
|
|
6668
6668
|
|
|
6669
6669
|
var CSSPropertyAngle = /*#__PURE__*/function () {
|
|
6670
6670
|
function CSSPropertyAngle() {
|
|
@@ -13282,7 +13282,7 @@ var Group = /*#__PURE__*/function (_DisplayObject) {
|
|
|
13282
13282
|
_inherits(Group, _DisplayObject);
|
|
13283
13283
|
return _createClass(Group);
|
|
13284
13284
|
}(DisplayObject);
|
|
13285
|
-
Group.PARSED_STYLE_LIST = new Set([
|
|
13285
|
+
Group.PARSED_STYLE_LIST = new Set(['class', 'className', 'clipPath', 'cursor', 'draggable', 'droppable', 'opacity', 'pointerEvents', 'transform', 'transformOrigin', 'zIndex', 'visibility']);
|
|
13286
13286
|
|
|
13287
13287
|
var _excluded$5 = ["style"];
|
|
13288
13288
|
/**
|