microboard-temp 0.5.51 → 0.5.52

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.
@@ -48845,7 +48845,12 @@ class AddScreen extends ShapeTool {
48845
48845
  super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
48846
48846
  }
48847
48847
  pointerUp() {
48848
- this.item.applyOwnerId(localStorage.getItem("currentUser") || "");
48848
+ let screenOwnerId = localStorage.getItem("currentUser") || localStorage.getItem("screenOwnerId");
48849
+ if (!screenOwnerId) {
48850
+ screenOwnerId = v4_default();
48851
+ localStorage.setItem("screenOwnerId", screenOwnerId);
48852
+ }
48853
+ this.item.applyOwnerId(screenOwnerId);
48849
48854
  return super.pointerUp();
48850
48855
  }
48851
48856
  }
@@ -48977,7 +48982,7 @@ class Screen extends BaseItem {
48977
48982
  return;
48978
48983
  }
48979
48984
  this.path.render(context);
48980
- if (localStorage.getItem("currentUser") === this.ownerId || !this.ownerId) {
48985
+ if (localStorage.getItem("currentUser") === this.ownerId || localStorage.getItem("screenOwnerId") === this.ownerId || !this.ownerId) {
48981
48986
  super.render(context);
48982
48987
  }
48983
48988
  }
package/dist/cjs/index.js CHANGED
@@ -48845,7 +48845,12 @@ class AddScreen extends ShapeTool {
48845
48845
  super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
48846
48846
  }
48847
48847
  pointerUp() {
48848
- this.item.applyOwnerId(localStorage.getItem("currentUser") || "");
48848
+ let screenOwnerId = localStorage.getItem("currentUser") || localStorage.getItem("screenOwnerId");
48849
+ if (!screenOwnerId) {
48850
+ screenOwnerId = v4_default();
48851
+ localStorage.setItem("screenOwnerId", screenOwnerId);
48852
+ }
48853
+ this.item.applyOwnerId(screenOwnerId);
48849
48854
  return super.pointerUp();
48850
48855
  }
48851
48856
  }
@@ -48977,7 +48982,7 @@ class Screen extends BaseItem {
48977
48982
  return;
48978
48983
  }
48979
48984
  this.path.render(context);
48980
- if (localStorage.getItem("currentUser") === this.ownerId || !this.ownerId) {
48985
+ if (localStorage.getItem("currentUser") === this.ownerId || localStorage.getItem("screenOwnerId") === this.ownerId || !this.ownerId) {
48981
48986
  super.render(context);
48982
48987
  }
48983
48988
  }
package/dist/cjs/node.js CHANGED
@@ -51318,7 +51318,12 @@ class AddScreen extends ShapeTool {
51318
51318
  super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
51319
51319
  }
51320
51320
  pointerUp() {
51321
- this.item.applyOwnerId(localStorage.getItem("currentUser") || "");
51321
+ let screenOwnerId = localStorage.getItem("currentUser") || localStorage.getItem("screenOwnerId");
51322
+ if (!screenOwnerId) {
51323
+ screenOwnerId = v4_default();
51324
+ localStorage.setItem("screenOwnerId", screenOwnerId);
51325
+ }
51326
+ this.item.applyOwnerId(screenOwnerId);
51322
51327
  return super.pointerUp();
51323
51328
  }
51324
51329
  }
@@ -51450,7 +51455,7 @@ class Screen extends BaseItem {
51450
51455
  return;
51451
51456
  }
51452
51457
  this.path.render(context);
51453
- if (localStorage.getItem("currentUser") === this.ownerId || !this.ownerId) {
51458
+ if (localStorage.getItem("currentUser") === this.ownerId || localStorage.getItem("screenOwnerId") === this.ownerId || !this.ownerId) {
51454
51459
  super.render(context);
51455
51460
  }
51456
51461
  }
@@ -48691,7 +48691,12 @@ class AddScreen extends ShapeTool {
48691
48691
  super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
48692
48692
  }
48693
48693
  pointerUp() {
48694
- this.item.applyOwnerId(localStorage.getItem("currentUser") || "");
48694
+ let screenOwnerId = localStorage.getItem("currentUser") || localStorage.getItem("screenOwnerId");
48695
+ if (!screenOwnerId) {
48696
+ screenOwnerId = v4_default();
48697
+ localStorage.setItem("screenOwnerId", screenOwnerId);
48698
+ }
48699
+ this.item.applyOwnerId(screenOwnerId);
48695
48700
  return super.pointerUp();
48696
48701
  }
48697
48702
  }
@@ -48823,7 +48828,7 @@ class Screen extends BaseItem {
48823
48828
  return;
48824
48829
  }
48825
48830
  this.path.render(context);
48826
- if (localStorage.getItem("currentUser") === this.ownerId || !this.ownerId) {
48831
+ if (localStorage.getItem("currentUser") === this.ownerId || localStorage.getItem("screenOwnerId") === this.ownerId || !this.ownerId) {
48827
48832
  super.render(context);
48828
48833
  }
48829
48834
  }
package/dist/esm/index.js CHANGED
@@ -48684,7 +48684,12 @@ class AddScreen extends ShapeTool {
48684
48684
  super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
48685
48685
  }
48686
48686
  pointerUp() {
48687
- this.item.applyOwnerId(localStorage.getItem("currentUser") || "");
48687
+ let screenOwnerId = localStorage.getItem("currentUser") || localStorage.getItem("screenOwnerId");
48688
+ if (!screenOwnerId) {
48689
+ screenOwnerId = v4_default();
48690
+ localStorage.setItem("screenOwnerId", screenOwnerId);
48691
+ }
48692
+ this.item.applyOwnerId(screenOwnerId);
48688
48693
  return super.pointerUp();
48689
48694
  }
48690
48695
  }
@@ -48816,7 +48821,7 @@ class Screen extends BaseItem {
48816
48821
  return;
48817
48822
  }
48818
48823
  this.path.render(context);
48819
- if (localStorage.getItem("currentUser") === this.ownerId || !this.ownerId) {
48824
+ if (localStorage.getItem("currentUser") === this.ownerId || localStorage.getItem("screenOwnerId") === this.ownerId || !this.ownerId) {
48820
48825
  super.render(context);
48821
48826
  }
48822
48827
  }
package/dist/esm/node.js CHANGED
@@ -51152,7 +51152,12 @@ class AddScreen extends ShapeTool {
51152
51152
  super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
51153
51153
  }
51154
51154
  pointerUp() {
51155
- this.item.applyOwnerId(localStorage.getItem("currentUser") || "");
51155
+ let screenOwnerId = localStorage.getItem("currentUser") || localStorage.getItem("screenOwnerId");
51156
+ if (!screenOwnerId) {
51157
+ screenOwnerId = v4_default();
51158
+ localStorage.setItem("screenOwnerId", screenOwnerId);
51159
+ }
51160
+ this.item.applyOwnerId(screenOwnerId);
51156
51161
  return super.pointerUp();
51157
51162
  }
51158
51163
  }
@@ -51284,7 +51289,7 @@ class Screen extends BaseItem {
51284
51289
  return;
51285
51290
  }
51286
51291
  this.path.render(context);
51287
- if (localStorage.getItem("currentUser") === this.ownerId || !this.ownerId) {
51292
+ if (localStorage.getItem("currentUser") === this.ownerId || localStorage.getItem("screenOwnerId") === this.ownerId || !this.ownerId) {
51288
51293
  super.render(context);
51289
51294
  }
51290
51295
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.5.51",
3
+ "version": "0.5.52",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",