@antv/g-lite 2.0.12-alpha.0 → 2.1.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/index.js CHANGED
@@ -7484,12 +7484,14 @@ var parser = {
7484
7484
  glMatrix.mat4.set.apply(glMatrix.mat4, tslib.__spreadArray([$mat4_1], tslib.__read(d.map(function (s) { return s.value; })), false));
7485
7485
  },
7486
7486
  };
7487
+ var $vec3One$1 = glMatrix.vec3.fromValues(1, 1, 1);
7488
+ var $vec3Zero$1 = glMatrix.vec3.create();
7487
7489
  var optimizer = {
7488
7490
  translate: function (object, d) {
7489
- object.setLocalPosition([d[0].value, d[1].value]);
7490
- },
7491
- translate3d: function (object, d) {
7492
- object.setLocalPosition([d[0].value, d[1].value, d[2].value]);
7491
+ runtime.sceneGraphService.setLocalScale(object, $vec3One$1, false);
7492
+ runtime.sceneGraphService.setLocalEulerAngles(object, $vec3Zero$1, undefined, undefined, false);
7493
+ runtime.sceneGraphService.setLocalPosition(object, [d[0].value, d[1].value, 0], false);
7494
+ runtime.sceneGraphService.dirtifyLocal(object, object.transformable);
7493
7495
  },
7494
7496
  };
7495
7497
  function parsedTransformToMat4(transform, object) {
@@ -14305,7 +14307,6 @@ var Canvas = /** @class */ (function (_super) {
14305
14307
  */
14306
14308
  _this.Element = DisplayObject;
14307
14309
  _this.inited = false;
14308
- _this.destroyed = false;
14309
14310
  _this.context = {};
14310
14311
  // create document
14311
14312
  _this.document = new Document();
@@ -14526,7 +14527,7 @@ var Canvas = /** @class */ (function (_super) {
14526
14527
  clearEventRetain(beforeRenderEvent);
14527
14528
  clearEventRetain(rerenderEvent);
14528
14529
  clearEventRetain(afterRenderEvent);
14529
- this.destroyed = true;
14530
+ this.cancelAnimationFrame(this.frameId);
14530
14531
  };
14531
14532
  /**
14532
14533
  * compatible with G 3.0
@@ -14598,8 +14599,6 @@ var Canvas = /** @class */ (function (_super) {
14598
14599
  Canvas.prototype.run = function () {
14599
14600
  var _this = this;
14600
14601
  var tick = function (time, frame) {
14601
- if (_this.destroyed)
14602
- return _this.cancelAnimationFrame(_this.frameId);
14603
14602
  _this.render(frame);
14604
14603
  _this.frameId = _this.requestAnimationFrame(tick);
14605
14604
  };
@@ -14716,14 +14715,12 @@ var Canvas = /** @class */ (function (_super) {
14716
14715
  _this.unmountChildren(child);
14717
14716
  });
14718
14717
  if (this.inited) {
14719
- if (!this.getConfig().cleanUpOnDestroy) {
14720
- if (parent.isMutationObserved) {
14721
- parent.dispatchEvent(unmountedEvent);
14722
- }
14723
- else {
14724
- unmountedEvent.target = parent;
14725
- this.dispatchEvent(unmountedEvent, true);
14726
- }
14718
+ if (parent.isMutationObserved) {
14719
+ parent.dispatchEvent(unmountedEvent);
14720
+ }
14721
+ else {
14722
+ unmountedEvent.target = parent;
14723
+ this.dispatchEvent(unmountedEvent, true);
14727
14724
  }
14728
14725
  // skip document.documentElement
14729
14726
  if (parent !== this.document.documentElement) {