microboard-temp 0.5.50 → 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.
- package/dist/cjs/browser.js +10 -2
- package/dist/cjs/index.js +10 -2
- package/dist/cjs/node.js +10 -2
- package/dist/esm/browser.js +10 -2
- package/dist/esm/index.js +10 -2
- package/dist/esm/node.js +10 -2
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -44004,10 +44004,13 @@ class AddFrame extends BoardTool {
|
|
|
44004
44004
|
this.initTransformation(width2 / 100, height2 / 100);
|
|
44005
44005
|
localStorage.setItem("lastFrameScale", JSON.stringify(this.frame.transformation.getScale()));
|
|
44006
44006
|
}
|
|
44007
|
+
const currMbr = this.frame.getMbr();
|
|
44008
|
+
const frameChildren = this.board.items.getEnclosedOrCrossed(currMbr.left, currMbr.top, currMbr.right, currMbr.bottom).filter((item) => item.parent === "Board").filter((item) => this.frame.handleNesting(item));
|
|
44007
44009
|
if (this.shape !== "Custom") {
|
|
44008
44010
|
this.applyCanChangeRatio(false);
|
|
44009
44011
|
}
|
|
44010
44012
|
const frame = this.board.add(this.frame);
|
|
44013
|
+
frame.emitNesting(frameChildren);
|
|
44011
44014
|
frame.text.editor.moveCursorToEndOfTheText();
|
|
44012
44015
|
this.nestingHighlighter.clear();
|
|
44013
44016
|
this.board.selection.removeAll();
|
|
@@ -48842,7 +48845,12 @@ class AddScreen extends ShapeTool {
|
|
|
48842
48845
|
super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
|
|
48843
48846
|
}
|
|
48844
48847
|
pointerUp() {
|
|
48845
|
-
|
|
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);
|
|
48846
48854
|
return super.pointerUp();
|
|
48847
48855
|
}
|
|
48848
48856
|
}
|
|
@@ -48974,7 +48982,7 @@ class Screen extends BaseItem {
|
|
|
48974
48982
|
return;
|
|
48975
48983
|
}
|
|
48976
48984
|
this.path.render(context);
|
|
48977
|
-
if (localStorage.getItem("currentUser") === this.ownerId || !this.ownerId) {
|
|
48985
|
+
if (localStorage.getItem("currentUser") === this.ownerId || localStorage.getItem("screenOwnerId") === this.ownerId || !this.ownerId) {
|
|
48978
48986
|
super.render(context);
|
|
48979
48987
|
}
|
|
48980
48988
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -44004,10 +44004,13 @@ class AddFrame extends BoardTool {
|
|
|
44004
44004
|
this.initTransformation(width2 / 100, height2 / 100);
|
|
44005
44005
|
localStorage.setItem("lastFrameScale", JSON.stringify(this.frame.transformation.getScale()));
|
|
44006
44006
|
}
|
|
44007
|
+
const currMbr = this.frame.getMbr();
|
|
44008
|
+
const frameChildren = this.board.items.getEnclosedOrCrossed(currMbr.left, currMbr.top, currMbr.right, currMbr.bottom).filter((item) => item.parent === "Board").filter((item) => this.frame.handleNesting(item));
|
|
44007
44009
|
if (this.shape !== "Custom") {
|
|
44008
44010
|
this.applyCanChangeRatio(false);
|
|
44009
44011
|
}
|
|
44010
44012
|
const frame = this.board.add(this.frame);
|
|
44013
|
+
frame.emitNesting(frameChildren);
|
|
44011
44014
|
frame.text.editor.moveCursorToEndOfTheText();
|
|
44012
44015
|
this.nestingHighlighter.clear();
|
|
44013
44016
|
this.board.selection.removeAll();
|
|
@@ -48842,7 +48845,12 @@ class AddScreen extends ShapeTool {
|
|
|
48842
48845
|
super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
|
|
48843
48846
|
}
|
|
48844
48847
|
pointerUp() {
|
|
48845
|
-
|
|
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);
|
|
48846
48854
|
return super.pointerUp();
|
|
48847
48855
|
}
|
|
48848
48856
|
}
|
|
@@ -48974,7 +48982,7 @@ class Screen extends BaseItem {
|
|
|
48974
48982
|
return;
|
|
48975
48983
|
}
|
|
48976
48984
|
this.path.render(context);
|
|
48977
|
-
if (localStorage.getItem("currentUser") === this.ownerId || !this.ownerId) {
|
|
48985
|
+
if (localStorage.getItem("currentUser") === this.ownerId || localStorage.getItem("screenOwnerId") === this.ownerId || !this.ownerId) {
|
|
48978
48986
|
super.render(context);
|
|
48979
48987
|
}
|
|
48980
48988
|
}
|
package/dist/cjs/node.js
CHANGED
|
@@ -46477,10 +46477,13 @@ class AddFrame extends BoardTool {
|
|
|
46477
46477
|
this.initTransformation(width2 / 100, height2 / 100);
|
|
46478
46478
|
localStorage.setItem("lastFrameScale", JSON.stringify(this.frame.transformation.getScale()));
|
|
46479
46479
|
}
|
|
46480
|
+
const currMbr = this.frame.getMbr();
|
|
46481
|
+
const frameChildren = this.board.items.getEnclosedOrCrossed(currMbr.left, currMbr.top, currMbr.right, currMbr.bottom).filter((item) => item.parent === "Board").filter((item) => this.frame.handleNesting(item));
|
|
46480
46482
|
if (this.shape !== "Custom") {
|
|
46481
46483
|
this.applyCanChangeRatio(false);
|
|
46482
46484
|
}
|
|
46483
46485
|
const frame = this.board.add(this.frame);
|
|
46486
|
+
frame.emitNesting(frameChildren);
|
|
46484
46487
|
frame.text.editor.moveCursorToEndOfTheText();
|
|
46485
46488
|
this.nestingHighlighter.clear();
|
|
46486
46489
|
this.board.selection.removeAll();
|
|
@@ -51315,7 +51318,12 @@ class AddScreen extends ShapeTool {
|
|
|
51315
51318
|
super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
|
|
51316
51319
|
}
|
|
51317
51320
|
pointerUp() {
|
|
51318
|
-
|
|
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);
|
|
51319
51327
|
return super.pointerUp();
|
|
51320
51328
|
}
|
|
51321
51329
|
}
|
|
@@ -51447,7 +51455,7 @@ class Screen extends BaseItem {
|
|
|
51447
51455
|
return;
|
|
51448
51456
|
}
|
|
51449
51457
|
this.path.render(context);
|
|
51450
|
-
if (localStorage.getItem("currentUser") === this.ownerId || !this.ownerId) {
|
|
51458
|
+
if (localStorage.getItem("currentUser") === this.ownerId || localStorage.getItem("screenOwnerId") === this.ownerId || !this.ownerId) {
|
|
51451
51459
|
super.render(context);
|
|
51452
51460
|
}
|
|
51453
51461
|
}
|
package/dist/esm/browser.js
CHANGED
|
@@ -43850,10 +43850,13 @@ class AddFrame extends BoardTool {
|
|
|
43850
43850
|
this.initTransformation(width2 / 100, height2 / 100);
|
|
43851
43851
|
localStorage.setItem("lastFrameScale", JSON.stringify(this.frame.transformation.getScale()));
|
|
43852
43852
|
}
|
|
43853
|
+
const currMbr = this.frame.getMbr();
|
|
43854
|
+
const frameChildren = this.board.items.getEnclosedOrCrossed(currMbr.left, currMbr.top, currMbr.right, currMbr.bottom).filter((item) => item.parent === "Board").filter((item) => this.frame.handleNesting(item));
|
|
43853
43855
|
if (this.shape !== "Custom") {
|
|
43854
43856
|
this.applyCanChangeRatio(false);
|
|
43855
43857
|
}
|
|
43856
43858
|
const frame = this.board.add(this.frame);
|
|
43859
|
+
frame.emitNesting(frameChildren);
|
|
43857
43860
|
frame.text.editor.moveCursorToEndOfTheText();
|
|
43858
43861
|
this.nestingHighlighter.clear();
|
|
43859
43862
|
this.board.selection.removeAll();
|
|
@@ -48688,7 +48691,12 @@ class AddScreen extends ShapeTool {
|
|
|
48688
48691
|
super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
|
|
48689
48692
|
}
|
|
48690
48693
|
pointerUp() {
|
|
48691
|
-
|
|
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);
|
|
48692
48700
|
return super.pointerUp();
|
|
48693
48701
|
}
|
|
48694
48702
|
}
|
|
@@ -48820,7 +48828,7 @@ class Screen extends BaseItem {
|
|
|
48820
48828
|
return;
|
|
48821
48829
|
}
|
|
48822
48830
|
this.path.render(context);
|
|
48823
|
-
if (localStorage.getItem("currentUser") === this.ownerId || !this.ownerId) {
|
|
48831
|
+
if (localStorage.getItem("currentUser") === this.ownerId || localStorage.getItem("screenOwnerId") === this.ownerId || !this.ownerId) {
|
|
48824
48832
|
super.render(context);
|
|
48825
48833
|
}
|
|
48826
48834
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -43843,10 +43843,13 @@ class AddFrame extends BoardTool {
|
|
|
43843
43843
|
this.initTransformation(width2 / 100, height2 / 100);
|
|
43844
43844
|
localStorage.setItem("lastFrameScale", JSON.stringify(this.frame.transformation.getScale()));
|
|
43845
43845
|
}
|
|
43846
|
+
const currMbr = this.frame.getMbr();
|
|
43847
|
+
const frameChildren = this.board.items.getEnclosedOrCrossed(currMbr.left, currMbr.top, currMbr.right, currMbr.bottom).filter((item) => item.parent === "Board").filter((item) => this.frame.handleNesting(item));
|
|
43846
43848
|
if (this.shape !== "Custom") {
|
|
43847
43849
|
this.applyCanChangeRatio(false);
|
|
43848
43850
|
}
|
|
43849
43851
|
const frame = this.board.add(this.frame);
|
|
43852
|
+
frame.emitNesting(frameChildren);
|
|
43850
43853
|
frame.text.editor.moveCursorToEndOfTheText();
|
|
43851
43854
|
this.nestingHighlighter.clear();
|
|
43852
43855
|
this.board.selection.removeAll();
|
|
@@ -48681,7 +48684,12 @@ class AddScreen extends ShapeTool {
|
|
|
48681
48684
|
super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
|
|
48682
48685
|
}
|
|
48683
48686
|
pointerUp() {
|
|
48684
|
-
|
|
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);
|
|
48685
48693
|
return super.pointerUp();
|
|
48686
48694
|
}
|
|
48687
48695
|
}
|
|
@@ -48813,7 +48821,7 @@ class Screen extends BaseItem {
|
|
|
48813
48821
|
return;
|
|
48814
48822
|
}
|
|
48815
48823
|
this.path.render(context);
|
|
48816
|
-
if (localStorage.getItem("currentUser") === this.ownerId || !this.ownerId) {
|
|
48824
|
+
if (localStorage.getItem("currentUser") === this.ownerId || localStorage.getItem("screenOwnerId") === this.ownerId || !this.ownerId) {
|
|
48817
48825
|
super.render(context);
|
|
48818
48826
|
}
|
|
48819
48827
|
}
|
package/dist/esm/node.js
CHANGED
|
@@ -46311,10 +46311,13 @@ class AddFrame extends BoardTool {
|
|
|
46311
46311
|
this.initTransformation(width2 / 100, height2 / 100);
|
|
46312
46312
|
localStorage.setItem("lastFrameScale", JSON.stringify(this.frame.transformation.getScale()));
|
|
46313
46313
|
}
|
|
46314
|
+
const currMbr = this.frame.getMbr();
|
|
46315
|
+
const frameChildren = this.board.items.getEnclosedOrCrossed(currMbr.left, currMbr.top, currMbr.right, currMbr.bottom).filter((item) => item.parent === "Board").filter((item) => this.frame.handleNesting(item));
|
|
46314
46316
|
if (this.shape !== "Custom") {
|
|
46315
46317
|
this.applyCanChangeRatio(false);
|
|
46316
46318
|
}
|
|
46317
46319
|
const frame = this.board.add(this.frame);
|
|
46320
|
+
frame.emitNesting(frameChildren);
|
|
46318
46321
|
frame.text.editor.moveCursorToEndOfTheText();
|
|
46319
46322
|
this.nestingHighlighter.clear();
|
|
46320
46323
|
this.board.selection.removeAll();
|
|
@@ -51149,7 +51152,12 @@ class AddScreen extends ShapeTool {
|
|
|
51149
51152
|
super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
|
|
51150
51153
|
}
|
|
51151
51154
|
pointerUp() {
|
|
51152
|
-
|
|
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);
|
|
51153
51161
|
return super.pointerUp();
|
|
51154
51162
|
}
|
|
51155
51163
|
}
|
|
@@ -51281,7 +51289,7 @@ class Screen extends BaseItem {
|
|
|
51281
51289
|
return;
|
|
51282
51290
|
}
|
|
51283
51291
|
this.path.render(context);
|
|
51284
|
-
if (localStorage.getItem("currentUser") === this.ownerId || !this.ownerId) {
|
|
51292
|
+
if (localStorage.getItem("currentUser") === this.ownerId || localStorage.getItem("screenOwnerId") === this.ownerId || !this.ownerId) {
|
|
51285
51293
|
super.render(context);
|
|
51286
51294
|
}
|
|
51287
51295
|
}
|