@antv/g-lite 2.0.12-alpha.0 → 2.1.0-alpha.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/Canvas.d.ts +0 -1
- package/dist/index.esm.js +16 -22
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +16 -22
- 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/dist/services/interfaces.d.ts +6 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3940,12 +3940,6 @@ function mergeDimensions(left, right, target, nonNegative, index) {
|
|
|
3940
3940
|
unit = 'px';
|
|
3941
3941
|
}
|
|
3942
3942
|
}
|
|
3943
|
-
// // format 'rad' 'turn' to 'deg'
|
|
3944
|
-
// if (CSSUnitValue.isAngle(left.unit) || CSSUnitValue.isAngle(right.unit)) {
|
|
3945
|
-
// leftValue = convertAngleUnit(left);
|
|
3946
|
-
// rightValue = convertAngleUnit(right);
|
|
3947
|
-
// unit = 'deg';
|
|
3948
|
-
// }
|
|
3949
3943
|
return [
|
|
3950
3944
|
leftValue,
|
|
3951
3945
|
rightValue,
|
|
@@ -3968,6 +3962,9 @@ function convertAngleUnit(value) {
|
|
|
3968
3962
|
else if (value.unit === exports.UnitType.kTurns) {
|
|
3969
3963
|
deg = turn2deg(Number(value.value));
|
|
3970
3964
|
}
|
|
3965
|
+
else if (value.value) {
|
|
3966
|
+
deg = value.value;
|
|
3967
|
+
}
|
|
3971
3968
|
return deg;
|
|
3972
3969
|
}
|
|
3973
3970
|
function parseDimensionArrayFormat(string, size) {
|
|
@@ -7484,12 +7481,14 @@ var parser = {
|
|
|
7484
7481
|
glMatrix.mat4.set.apply(glMatrix.mat4, tslib.__spreadArray([$mat4_1], tslib.__read(d.map(function (s) { return s.value; })), false));
|
|
7485
7482
|
},
|
|
7486
7483
|
};
|
|
7484
|
+
var $vec3One$1 = glMatrix.vec3.fromValues(1, 1, 1);
|
|
7485
|
+
var $vec3Zero$1 = glMatrix.vec3.create();
|
|
7487
7486
|
var optimizer = {
|
|
7488
7487
|
translate: function (object, d) {
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7488
|
+
runtime.sceneGraphService.setLocalScale(object, $vec3One$1, false);
|
|
7489
|
+
runtime.sceneGraphService.setLocalEulerAngles(object, $vec3Zero$1, undefined, undefined, false);
|
|
7490
|
+
runtime.sceneGraphService.setLocalPosition(object, [d[0].value, d[1].value, 0], false);
|
|
7491
|
+
runtime.sceneGraphService.dirtifyLocal(object, object.transformable);
|
|
7493
7492
|
},
|
|
7494
7493
|
};
|
|
7495
7494
|
function parsedTransformToMat4(transform, object) {
|
|
@@ -14305,7 +14304,6 @@ var Canvas = /** @class */ (function (_super) {
|
|
|
14305
14304
|
*/
|
|
14306
14305
|
_this.Element = DisplayObject;
|
|
14307
14306
|
_this.inited = false;
|
|
14308
|
-
_this.destroyed = false;
|
|
14309
14307
|
_this.context = {};
|
|
14310
14308
|
// create document
|
|
14311
14309
|
_this.document = new Document();
|
|
@@ -14526,7 +14524,7 @@ var Canvas = /** @class */ (function (_super) {
|
|
|
14526
14524
|
clearEventRetain(beforeRenderEvent);
|
|
14527
14525
|
clearEventRetain(rerenderEvent);
|
|
14528
14526
|
clearEventRetain(afterRenderEvent);
|
|
14529
|
-
this.
|
|
14527
|
+
this.cancelAnimationFrame(this.frameId);
|
|
14530
14528
|
};
|
|
14531
14529
|
/**
|
|
14532
14530
|
* compatible with G 3.0
|
|
@@ -14598,8 +14596,6 @@ var Canvas = /** @class */ (function (_super) {
|
|
|
14598
14596
|
Canvas.prototype.run = function () {
|
|
14599
14597
|
var _this = this;
|
|
14600
14598
|
var tick = function (time, frame) {
|
|
14601
|
-
if (_this.destroyed)
|
|
14602
|
-
return _this.cancelAnimationFrame(_this.frameId);
|
|
14603
14599
|
_this.render(frame);
|
|
14604
14600
|
_this.frameId = _this.requestAnimationFrame(tick);
|
|
14605
14601
|
};
|
|
@@ -14716,14 +14712,12 @@ var Canvas = /** @class */ (function (_super) {
|
|
|
14716
14712
|
_this.unmountChildren(child);
|
|
14717
14713
|
});
|
|
14718
14714
|
if (this.inited) {
|
|
14719
|
-
if (
|
|
14720
|
-
|
|
14721
|
-
|
|
14722
|
-
|
|
14723
|
-
|
|
14724
|
-
|
|
14725
|
-
this.dispatchEvent(unmountedEvent, true);
|
|
14726
|
-
}
|
|
14715
|
+
if (parent.isMutationObserved) {
|
|
14716
|
+
parent.dispatchEvent(unmountedEvent);
|
|
14717
|
+
}
|
|
14718
|
+
else {
|
|
14719
|
+
unmountedEvent.target = parent;
|
|
14720
|
+
this.dispatchEvent(unmountedEvent, true);
|
|
14727
14721
|
}
|
|
14728
14722
|
// skip document.documentElement
|
|
14729
14723
|
if (parent !== this.document.documentElement) {
|