leafer-draw 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$5 = Debug.get('LeaferCanvas');
6010
6010
  class LeaferCanvas extends LeaferCanvasBase {
@@ -7803,10 +7803,13 @@ var LeaferUI = (function (exports) {
7803
7803
  const data = DataHelper.copyAttrs({}, size, canvasSizeAttrs);
7804
7804
  Object.keys(data).forEach(key => this[key] = data[key]);
7805
7805
  }
7806
- forceRender(bounds) {
7807
- this.renderer.addBlock(bounds ? new Bounds(bounds) : this.canvas.bounds);
7808
- if (this.viewReady)
7809
- this.renderer.render();
7806
+ forceRender(bounds, sync) {
7807
+ const { renderer } = this;
7808
+ if (renderer) {
7809
+ renderer.addBlock(bounds ? new Bounds(bounds) : this.canvas.bounds);
7810
+ if (this.viewReady)
7811
+ sync ? renderer.render() : renderer.update();
7812
+ }
7810
7813
  }
7811
7814
  requestRender(change = false) {
7812
7815
  if (this.renderer)