@antv/g-lite 1.3.0-next.13 → 1.3.0-next.14
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 +45 -23
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +45 -23
- package/dist/index.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -6711,6 +6711,9 @@ var DefaultStyleValueRegistry = /** @class */ (function () {
|
|
|
6711
6711
|
object.geometry.dirty = true;
|
|
6712
6712
|
object.renderable.boundsDirty = true;
|
|
6713
6713
|
object.renderable.renderBoundsDirty = true;
|
|
6714
|
+
if (!options.forceUpdateGeometry) {
|
|
6715
|
+
this.runtime.sceneGraphService.dirtifyToRoot(object);
|
|
6716
|
+
}
|
|
6714
6717
|
}
|
|
6715
6718
|
}
|
|
6716
6719
|
else {
|
|
@@ -6772,6 +6775,9 @@ var DefaultStyleValueRegistry = /** @class */ (function () {
|
|
|
6772
6775
|
object.geometry.dirty = true;
|
|
6773
6776
|
object.renderable.boundsDirty = true;
|
|
6774
6777
|
object.renderable.renderBoundsDirty = true;
|
|
6778
|
+
if (!options.forceUpdateGeometry) {
|
|
6779
|
+
this.runtime.sceneGraphService.dirtifyToRoot(object);
|
|
6780
|
+
}
|
|
6775
6781
|
}
|
|
6776
6782
|
attributeNames_1.forEach(function (name) {
|
|
6777
6783
|
if (name in object.parsedStyle) {
|
|
@@ -7397,7 +7403,6 @@ var CSSPropertyPath = /** @class */ (function () {
|
|
|
7397
7403
|
rect: new Rectangle(0, 0, 0, 0),
|
|
7398
7404
|
};
|
|
7399
7405
|
}
|
|
7400
|
-
console.log('parsed', parsed);
|
|
7401
7406
|
return parsed;
|
|
7402
7407
|
};
|
|
7403
7408
|
return CSSPropertyPath;
|
|
@@ -7825,6 +7830,7 @@ function createSkewMatrix(skewMatrix, skewX, skewY) {
|
|
|
7825
7830
|
skewMatrix[1] = Math.tan(skewY); // Skew X axis in Y direction
|
|
7826
7831
|
return skewMatrix;
|
|
7827
7832
|
}
|
|
7833
|
+
var SCALE_EPSILON = 0.00001;
|
|
7828
7834
|
var tmpMat1 = mat4.create();
|
|
7829
7835
|
var tmpMat2 = mat4.create();
|
|
7830
7836
|
function parsedTransformToMat4(transform, object) {
|
|
@@ -7834,23 +7840,27 @@ function parsedTransformToMat4(transform, object) {
|
|
|
7834
7840
|
var t = parsed.t, d = parsed.d;
|
|
7835
7841
|
if (t === 'scale') {
|
|
7836
7842
|
// scale(1) scale(1, 1)
|
|
7837
|
-
var newScale = (d === null || d === void 0 ? void 0 : d.map(function (s) { return s.value; })) || [
|
|
7843
|
+
var newScale = (d === null || d === void 0 ? void 0 : d.map(function (s) { return Math.max(s.value, SCALE_EPSILON); })) || [
|
|
7844
|
+
1, 1,
|
|
7845
|
+
];
|
|
7838
7846
|
mat4.fromScaling(tmpMat2, [newScale[0], newScale[1], 1]);
|
|
7839
7847
|
}
|
|
7840
7848
|
else if (t === 'scalex') {
|
|
7841
|
-
var newScale = (d === null || d === void 0 ? void 0 : d.map(function (s) { return s.value; })) || [1];
|
|
7849
|
+
var newScale = (d === null || d === void 0 ? void 0 : d.map(function (s) { return Math.max(s.value, SCALE_EPSILON); })) || [1];
|
|
7842
7850
|
mat4.fromScaling(tmpMat2, [newScale[0], 1, 1]);
|
|
7843
7851
|
}
|
|
7844
7852
|
else if (t === 'scaley') {
|
|
7845
|
-
var newScale = (d === null || d === void 0 ? void 0 : d.map(function (s) { return s.value; })) || [1];
|
|
7853
|
+
var newScale = (d === null || d === void 0 ? void 0 : d.map(function (s) { return Math.max(s.value, SCALE_EPSILON); })) || [1];
|
|
7846
7854
|
mat4.fromScaling(tmpMat2, [1, newScale[0], 1]);
|
|
7847
7855
|
}
|
|
7848
7856
|
else if (t === 'scalez') {
|
|
7849
|
-
var newScale = (d === null || d === void 0 ? void 0 : d.map(function (s) { return s.value; })) || [1];
|
|
7857
|
+
var newScale = (d === null || d === void 0 ? void 0 : d.map(function (s) { return Math.max(s.value, SCALE_EPSILON); })) || [1];
|
|
7850
7858
|
mat4.fromScaling(tmpMat2, [1, 1, newScale[0]]);
|
|
7851
7859
|
}
|
|
7852
7860
|
else if (t === 'scale3d') {
|
|
7853
|
-
var newScale = (d === null || d === void 0 ? void 0 : d.map(function (s) { return s.value; })) || [
|
|
7861
|
+
var newScale = (d === null || d === void 0 ? void 0 : d.map(function (s) { return Math.max(s.value, SCALE_EPSILON); })) || [
|
|
7862
|
+
1, 1, 1,
|
|
7863
|
+
];
|
|
7854
7864
|
mat4.fromScaling(tmpMat2, [newScale[0], newScale[1], newScale[2]]);
|
|
7855
7865
|
}
|
|
7856
7866
|
else if (t === 'translate') {
|
|
@@ -11637,7 +11647,16 @@ var entityCounter = 0;
|
|
|
11637
11647
|
function resetEntityCounter() {
|
|
11638
11648
|
entityCounter = 0;
|
|
11639
11649
|
}
|
|
11640
|
-
|
|
11650
|
+
// const insertedEvent = new MutationEvent(
|
|
11651
|
+
// ElementEvent.INSERTED,
|
|
11652
|
+
// null,
|
|
11653
|
+
// '',
|
|
11654
|
+
// '',
|
|
11655
|
+
// '',
|
|
11656
|
+
// 0,
|
|
11657
|
+
// '',
|
|
11658
|
+
// '',
|
|
11659
|
+
// );
|
|
11641
11660
|
var removedEvent = new MutationEvent(ElementEvent.REMOVED, null, '', '', '', 0, '', '');
|
|
11642
11661
|
var destroyEvent = new CustomEvent(ElementEvent.DESTROY);
|
|
11643
11662
|
/**
|
|
@@ -12263,7 +12282,20 @@ var DEFAULT_PARSED_STYLE_PROPS = {
|
|
|
12263
12282
|
shadowType: 'outer',
|
|
12264
12283
|
miterLimit: 10,
|
|
12265
12284
|
};
|
|
12266
|
-
|
|
12285
|
+
// const DEFAULT_PARSED_STYLE_PROPS_CSS_DISABLED = {
|
|
12286
|
+
// ...DEFAULT_PARSED_STYLE_PROPS,
|
|
12287
|
+
// opacity: 1,
|
|
12288
|
+
// fillOpacity: 1,
|
|
12289
|
+
// strokeOpacity: 1,
|
|
12290
|
+
// visibility: 'visible',
|
|
12291
|
+
// pointerEvents: 'auto',
|
|
12292
|
+
// lineWidth: 1,
|
|
12293
|
+
// lineCap: 'butt',
|
|
12294
|
+
// lineJoin: 'miter',
|
|
12295
|
+
// increasedLineWidthForHitTesting: 0,
|
|
12296
|
+
// fillRule: 'nonzero',
|
|
12297
|
+
// // TODO: transformOrigin
|
|
12298
|
+
// };
|
|
12267
12299
|
var INHERITABLE_BASE_STYLE_PROPS = [
|
|
12268
12300
|
'opacity',
|
|
12269
12301
|
'fillOpacity',
|
|
@@ -12975,9 +13007,7 @@ var Circle = /** @class */ (function (_super) {
|
|
|
12975
13007
|
__extends(Circle, _super);
|
|
12976
13008
|
function Circle(options) {
|
|
12977
13009
|
if (options === void 0) { options = {}; }
|
|
12978
|
-
|
|
12979
|
-
_this.nodeName = Shape.CIRCLE;
|
|
12980
|
-
return _this;
|
|
13010
|
+
return _super.call(this, __assign({ type: Shape.CIRCLE }, options)) || this;
|
|
12981
13011
|
}
|
|
12982
13012
|
return Circle;
|
|
12983
13013
|
}(DisplayObject));
|
|
@@ -13008,9 +13038,7 @@ var Ellipse = /** @class */ (function (_super) {
|
|
|
13008
13038
|
__extends(Ellipse, _super);
|
|
13009
13039
|
function Ellipse(options) {
|
|
13010
13040
|
if (options === void 0) { options = {}; }
|
|
13011
|
-
|
|
13012
|
-
_this.nodeName = Shape.ELLIPSE;
|
|
13013
|
-
return _this;
|
|
13041
|
+
return _super.call(this, __assign({ type: Shape.ELLIPSE }, options)) || this;
|
|
13014
13042
|
}
|
|
13015
13043
|
return Ellipse;
|
|
13016
13044
|
}(DisplayObject));
|
|
@@ -13029,9 +13057,7 @@ var Group = /** @class */ (function (_super) {
|
|
|
13029
13057
|
__extends(Group, _super);
|
|
13030
13058
|
function Group(options) {
|
|
13031
13059
|
if (options === void 0) { options = {}; }
|
|
13032
|
-
|
|
13033
|
-
_this.nodeName = Shape.GROUP;
|
|
13034
|
-
return _this;
|
|
13060
|
+
return _super.call(this, __assign({ type: Shape.GROUP }, options)) || this;
|
|
13035
13061
|
}
|
|
13036
13062
|
return Group;
|
|
13037
13063
|
}(DisplayObject));
|
|
@@ -13106,9 +13132,7 @@ var Image = /** @class */ (function (_super) {
|
|
|
13106
13132
|
__extends(Image, _super);
|
|
13107
13133
|
function Image(options) {
|
|
13108
13134
|
if (options === void 0) { options = {}; }
|
|
13109
|
-
|
|
13110
|
-
_this.nodeName = Shape.IMAGE;
|
|
13111
|
-
return _this;
|
|
13135
|
+
return _super.call(this, __assign({ type: Shape.IMAGE }, options)) || this;
|
|
13112
13136
|
}
|
|
13113
13137
|
return Image;
|
|
13114
13138
|
}(DisplayObject));
|
|
@@ -13641,9 +13665,7 @@ var Rect = /** @class */ (function (_super) {
|
|
|
13641
13665
|
__extends(Rect, _super);
|
|
13642
13666
|
function Rect(options) {
|
|
13643
13667
|
if (options === void 0) { options = {}; }
|
|
13644
|
-
|
|
13645
|
-
_this.nodeName = Shape.RECT;
|
|
13646
|
-
return _this;
|
|
13668
|
+
return _super.call(this, __assign({ type: Shape.RECT }, options)) || this;
|
|
13647
13669
|
}
|
|
13648
13670
|
return Rect;
|
|
13649
13671
|
}(DisplayObject));
|