@leafer-draw/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.
package/dist/worker.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
  class LeaferCanvas extends LeaferCanvasBase {
6010
6010
  get allowBackgroundColor() { return true; }
@@ -7630,10 +7630,13 @@ var LeaferUI = (function (exports) {
7630
7630
  const data = DataHelper.copyAttrs({}, size, canvasSizeAttrs);
7631
7631
  Object.keys(data).forEach(key => this[key] = data[key]);
7632
7632
  }
7633
- forceRender(bounds) {
7634
- this.renderer.addBlock(bounds ? new Bounds(bounds) : this.canvas.bounds);
7635
- if (this.viewReady)
7636
- this.renderer.render();
7633
+ forceRender(bounds, sync) {
7634
+ const { renderer } = this;
7635
+ if (renderer) {
7636
+ renderer.addBlock(bounds ? new Bounds(bounds) : this.canvas.bounds);
7637
+ if (this.viewReady)
7638
+ sync ? renderer.render() : renderer.update();
7639
+ }
7637
7640
  }
7638
7641
  requestRender(change = false) {
7639
7642
  if (this.renderer)