@leafer-ui/worker 1.2.0 → 1.2.1

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.
@@ -5431,7 +5431,7 @@ let Leaf = class Leaf {
5431
5431
  this.__[attrName] = value === undefined ? null : undefined;
5432
5432
  this[attrName] = value;
5433
5433
  }
5434
- forceRender(_bounds) {
5434
+ forceRender(_bounds, _sync) {
5435
5435
  this.forceUpdate('surface');
5436
5436
  }
5437
5437
  __updateWorldMatrix() { }
@@ -6001,7 +6001,7 @@ class LeafLevelList {
6001
6001
  }
6002
6002
  }
6003
6003
 
6004
- const version = "1.2.0";
6004
+ const version = "1.2.1";
6005
6005
 
6006
6006
  class LeaferCanvas extends LeaferCanvasBase {
6007
6007
  get allowBackgroundColor() { return true; }
@@ -7900,10 +7900,13 @@ let Leafer = Leafer_1 = class Leafer extends Group {
7900
7900
  const data = DataHelper.copyAttrs({}, size, canvasSizeAttrs);
7901
7901
  Object.keys(data).forEach(key => this[key] = data[key]);
7902
7902
  }
7903
- forceRender(bounds) {
7904
- this.renderer.addBlock(bounds ? new Bounds(bounds) : this.canvas.bounds);
7905
- if (this.viewReady)
7906
- this.renderer.render();
7903
+ forceRender(bounds, sync) {
7904
+ const { renderer } = this;
7905
+ if (renderer) {
7906
+ renderer.addBlock(bounds ? new Bounds(bounds) : this.canvas.bounds);
7907
+ if (this.viewReady)
7908
+ sync ? renderer.render() : renderer.update();
7909
+ }
7907
7910
  }
7908
7911
  requestRender(change = false) {
7909
7912
  if (this.renderer)
@@ -8892,8 +8895,8 @@ let App = class App extends Leafer {
8892
8895
  super.lockLayout();
8893
8896
  this.children.forEach(leafer => leafer.lockLayout());
8894
8897
  }
8895
- forceRender(bounds) {
8896
- this.children.forEach(leafer => leafer.forceRender(bounds));
8898
+ forceRender(bounds, sync) {
8899
+ this.children.forEach(leafer => leafer.forceRender(bounds, sync));
8897
8900
  }
8898
8901
  addLeafer(merge) {
8899
8902
  const leafer = new Leafer(merge);