microboard-temp 0.4.90 → 0.4.92

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.
@@ -48056,16 +48056,21 @@ class Deck extends BaseItem {
48056
48056
  this.updateCache(context);
48057
48057
  this.isCacheDirty = false;
48058
48058
  }
48059
- if (this.cachedCanvas) {
48059
+ if (this.cachedCanvas && this.cachedCanvas.width && this.cachedCanvas.height) {
48060
48060
  ctx.save();
48061
48061
  ctx.drawImage(this.cachedCanvas, this.left, this.top);
48062
48062
  ctx.restore();
48063
48063
  }
48064
48064
  }
48065
48065
  updateCache(context) {
48066
+ const width2 = this.getWidth();
48067
+ const height3 = this.getHeight();
48068
+ if (!width2 || !height3) {
48069
+ return;
48070
+ }
48066
48071
  const tempCanvas = document.createElement("canvas");
48067
- tempCanvas.width = this.getWidth();
48068
- tempCanvas.height = this.getHeight();
48072
+ tempCanvas.width = width2;
48073
+ tempCanvas.height = height3;
48069
48074
  const tempCtx = tempCanvas.getContext("2d");
48070
48075
  if (!tempCtx)
48071
48076
  return;
package/dist/cjs/index.js CHANGED
@@ -48056,16 +48056,21 @@ class Deck extends BaseItem {
48056
48056
  this.updateCache(context);
48057
48057
  this.isCacheDirty = false;
48058
48058
  }
48059
- if (this.cachedCanvas) {
48059
+ if (this.cachedCanvas && this.cachedCanvas.width && this.cachedCanvas.height) {
48060
48060
  ctx.save();
48061
48061
  ctx.drawImage(this.cachedCanvas, this.left, this.top);
48062
48062
  ctx.restore();
48063
48063
  }
48064
48064
  }
48065
48065
  updateCache(context) {
48066
+ const width2 = this.getWidth();
48067
+ const height3 = this.getHeight();
48068
+ if (!width2 || !height3) {
48069
+ return;
48070
+ }
48066
48071
  const tempCanvas = document.createElement("canvas");
48067
- tempCanvas.width = this.getWidth();
48068
- tempCanvas.height = this.getHeight();
48072
+ tempCanvas.width = width2;
48073
+ tempCanvas.height = height3;
48069
48074
  const tempCtx = tempCanvas.getContext("2d");
48070
48075
  if (!tempCtx)
48071
48076
  return;
package/dist/cjs/node.js CHANGED
@@ -50529,16 +50529,21 @@ class Deck extends BaseItem {
50529
50529
  this.updateCache(context);
50530
50530
  this.isCacheDirty = false;
50531
50531
  }
50532
- if (this.cachedCanvas) {
50532
+ if (this.cachedCanvas && this.cachedCanvas.width && this.cachedCanvas.height) {
50533
50533
  ctx.save();
50534
50534
  ctx.drawImage(this.cachedCanvas, this.left, this.top);
50535
50535
  ctx.restore();
50536
50536
  }
50537
50537
  }
50538
50538
  updateCache(context) {
50539
+ const width2 = this.getWidth();
50540
+ const height3 = this.getHeight();
50541
+ if (!width2 || !height3) {
50542
+ return;
50543
+ }
50539
50544
  const tempCanvas = document.createElement("canvas");
50540
- tempCanvas.width = this.getWidth();
50541
- tempCanvas.height = this.getHeight();
50545
+ tempCanvas.width = width2;
50546
+ tempCanvas.height = height3;
50542
50547
  const tempCtx = tempCanvas.getContext("2d");
50543
50548
  if (!tempCtx)
50544
50549
  return;
@@ -47905,16 +47905,21 @@ class Deck extends BaseItem {
47905
47905
  this.updateCache(context);
47906
47906
  this.isCacheDirty = false;
47907
47907
  }
47908
- if (this.cachedCanvas) {
47908
+ if (this.cachedCanvas && this.cachedCanvas.width && this.cachedCanvas.height) {
47909
47909
  ctx.save();
47910
47910
  ctx.drawImage(this.cachedCanvas, this.left, this.top);
47911
47911
  ctx.restore();
47912
47912
  }
47913
47913
  }
47914
47914
  updateCache(context) {
47915
+ const width2 = this.getWidth();
47916
+ const height3 = this.getHeight();
47917
+ if (!width2 || !height3) {
47918
+ return;
47919
+ }
47915
47920
  const tempCanvas = document.createElement("canvas");
47916
- tempCanvas.width = this.getWidth();
47917
- tempCanvas.height = this.getHeight();
47921
+ tempCanvas.width = width2;
47922
+ tempCanvas.height = height3;
47918
47923
  const tempCtx = tempCanvas.getContext("2d");
47919
47924
  if (!tempCtx)
47920
47925
  return;
package/dist/esm/index.js CHANGED
@@ -47898,16 +47898,21 @@ class Deck extends BaseItem {
47898
47898
  this.updateCache(context);
47899
47899
  this.isCacheDirty = false;
47900
47900
  }
47901
- if (this.cachedCanvas) {
47901
+ if (this.cachedCanvas && this.cachedCanvas.width && this.cachedCanvas.height) {
47902
47902
  ctx.save();
47903
47903
  ctx.drawImage(this.cachedCanvas, this.left, this.top);
47904
47904
  ctx.restore();
47905
47905
  }
47906
47906
  }
47907
47907
  updateCache(context) {
47908
+ const width2 = this.getWidth();
47909
+ const height3 = this.getHeight();
47910
+ if (!width2 || !height3) {
47911
+ return;
47912
+ }
47908
47913
  const tempCanvas = document.createElement("canvas");
47909
- tempCanvas.width = this.getWidth();
47910
- tempCanvas.height = this.getHeight();
47914
+ tempCanvas.width = width2;
47915
+ tempCanvas.height = height3;
47911
47916
  const tempCtx = tempCanvas.getContext("2d");
47912
47917
  if (!tempCtx)
47913
47918
  return;
package/dist/esm/node.js CHANGED
@@ -50366,16 +50366,21 @@ class Deck extends BaseItem {
50366
50366
  this.updateCache(context);
50367
50367
  this.isCacheDirty = false;
50368
50368
  }
50369
- if (this.cachedCanvas) {
50369
+ if (this.cachedCanvas && this.cachedCanvas.width && this.cachedCanvas.height) {
50370
50370
  ctx.save();
50371
50371
  ctx.drawImage(this.cachedCanvas, this.left, this.top);
50372
50372
  ctx.restore();
50373
50373
  }
50374
50374
  }
50375
50375
  updateCache(context) {
50376
+ const width2 = this.getWidth();
50377
+ const height3 = this.getHeight();
50378
+ if (!width2 || !height3) {
50379
+ return;
50380
+ }
50376
50381
  const tempCanvas = document.createElement("canvas");
50377
- tempCanvas.width = this.getWidth();
50378
- tempCanvas.height = this.getHeight();
50382
+ tempCanvas.width = width2;
50383
+ tempCanvas.height = height3;
50379
50384
  const tempCtx = tempCanvas.getContext("2d");
50380
50385
  if (!tempCtx)
50381
50386
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.4.90",
3
+ "version": "0.4.92",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",