leafer-ui 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.
package/dist/web.js CHANGED
@@ -5434,7 +5434,7 @@ var LeaferUI = (function (exports) {
5434
5434
  this.__[attrName] = value === undefined ? null : undefined;
5435
5435
  this[attrName] = value;
5436
5436
  }
5437
- forceRender(_bounds) {
5437
+ forceRender(_bounds, _sync) {
5438
5438
  this.forceUpdate('surface');
5439
5439
  }
5440
5440
  __updateWorldMatrix() { }
@@ -6004,7 +6004,7 @@ var LeaferUI = (function (exports) {
6004
6004
  }
6005
6005
  }
6006
6006
 
6007
- const version = "1.2.0";
6007
+ const version = "1.2.1";
6008
6008
 
6009
6009
  const debug$6 = Debug.get('LeaferCanvas');
6010
6010
  class LeaferCanvas extends LeaferCanvasBase {
@@ -8076,10 +8076,13 @@ var LeaferUI = (function (exports) {
8076
8076
  const data = DataHelper.copyAttrs({}, size, canvasSizeAttrs);
8077
8077
  Object.keys(data).forEach(key => this[key] = data[key]);
8078
8078
  }
8079
- forceRender(bounds) {
8080
- this.renderer.addBlock(bounds ? new Bounds(bounds) : this.canvas.bounds);
8081
- if (this.viewReady)
8082
- this.renderer.render();
8079
+ forceRender(bounds, sync) {
8080
+ const { renderer } = this;
8081
+ if (renderer) {
8082
+ renderer.addBlock(bounds ? new Bounds(bounds) : this.canvas.bounds);
8083
+ if (this.viewReady)
8084
+ sync ? renderer.render() : renderer.update();
8085
+ }
8083
8086
  }
8084
8087
  requestRender(change = false) {
8085
8088
  if (this.renderer)
@@ -9068,8 +9071,8 @@ var LeaferUI = (function (exports) {
9068
9071
  super.lockLayout();
9069
9072
  this.children.forEach(leafer => leafer.lockLayout());
9070
9073
  }
9071
- forceRender(bounds) {
9072
- this.children.forEach(leafer => leafer.forceRender(bounds));
9074
+ forceRender(bounds, sync) {
9075
+ this.children.forEach(leafer => leafer.forceRender(bounds, sync));
9073
9076
  }
9074
9077
  addLeafer(merge) {
9075
9078
  const leafer = new exports.Leafer(merge);