microboard-ui-temp 0.1.123 → 0.1.125
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/index.js +10 -2
- package/dist/spa.js +10 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -271581,10 +271581,13 @@ class AddFrame extends BoardTool {
|
|
|
271581
271581
|
this.initTransformation(width2 / 100, height2 / 100);
|
|
271582
271582
|
localStorage.setItem("lastFrameScale", JSON.stringify(this.frame.transformation.getScale()));
|
|
271583
271583
|
}
|
|
271584
|
+
const currMbr = this.frame.getMbr();
|
|
271585
|
+
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));
|
|
271584
271586
|
if (this.shape !== "Custom") {
|
|
271585
271587
|
this.applyCanChangeRatio(false);
|
|
271586
271588
|
}
|
|
271587
271589
|
const frame = this.board.add(this.frame);
|
|
271590
|
+
frame.emitNesting(frameChildren);
|
|
271588
271591
|
frame.text.editor.moveCursorToEndOfTheText();
|
|
271589
271592
|
this.nestingHighlighter.clear();
|
|
271590
271593
|
this.board.selection.removeAll();
|
|
@@ -276380,7 +276383,12 @@ class AddScreen extends ShapeTool {
|
|
|
276380
276383
|
super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
|
|
276381
276384
|
}
|
|
276382
276385
|
pointerUp() {
|
|
276383
|
-
|
|
276386
|
+
let screenOwnerId = localStorage.getItem("currentUser") || localStorage.getItem("screenOwnerId");
|
|
276387
|
+
if (!screenOwnerId) {
|
|
276388
|
+
screenOwnerId = v4_default();
|
|
276389
|
+
localStorage.setItem("screenOwnerId", screenOwnerId);
|
|
276390
|
+
}
|
|
276391
|
+
this.item.applyOwnerId(screenOwnerId);
|
|
276384
276392
|
return super.pointerUp();
|
|
276385
276393
|
}
|
|
276386
276394
|
}
|
|
@@ -276510,7 +276518,7 @@ class Screen extends BaseItem {
|
|
|
276510
276518
|
return;
|
|
276511
276519
|
}
|
|
276512
276520
|
this.path.render(context);
|
|
276513
|
-
if (localStorage.getItem("currentUser") === this.ownerId || !this.ownerId) {
|
|
276521
|
+
if (localStorage.getItem("currentUser") === this.ownerId || localStorage.getItem("screenOwnerId") === this.ownerId || !this.ownerId) {
|
|
276514
276522
|
super.render(context);
|
|
276515
276523
|
}
|
|
276516
276524
|
}
|
package/dist/spa.js
CHANGED
|
@@ -271581,10 +271581,13 @@ class AddFrame extends BoardTool {
|
|
|
271581
271581
|
this.initTransformation(width2 / 100, height2 / 100);
|
|
271582
271582
|
localStorage.setItem("lastFrameScale", JSON.stringify(this.frame.transformation.getScale()));
|
|
271583
271583
|
}
|
|
271584
|
+
const currMbr = this.frame.getMbr();
|
|
271585
|
+
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));
|
|
271584
271586
|
if (this.shape !== "Custom") {
|
|
271585
271587
|
this.applyCanChangeRatio(false);
|
|
271586
271588
|
}
|
|
271587
271589
|
const frame = this.board.add(this.frame);
|
|
271590
|
+
frame.emitNesting(frameChildren);
|
|
271588
271591
|
frame.text.editor.moveCursorToEndOfTheText();
|
|
271589
271592
|
this.nestingHighlighter.clear();
|
|
271590
271593
|
this.board.selection.removeAll();
|
|
@@ -276380,7 +276383,12 @@ class AddScreen extends ShapeTool {
|
|
|
276380
276383
|
super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
|
|
276381
276384
|
}
|
|
276382
276385
|
pointerUp() {
|
|
276383
|
-
|
|
276386
|
+
let screenOwnerId = localStorage.getItem("currentUser") || localStorage.getItem("screenOwnerId");
|
|
276387
|
+
if (!screenOwnerId) {
|
|
276388
|
+
screenOwnerId = v4_default();
|
|
276389
|
+
localStorage.setItem("screenOwnerId", screenOwnerId);
|
|
276390
|
+
}
|
|
276391
|
+
this.item.applyOwnerId(screenOwnerId);
|
|
276384
276392
|
return super.pointerUp();
|
|
276385
276393
|
}
|
|
276386
276394
|
}
|
|
@@ -276510,7 +276518,7 @@ class Screen extends BaseItem {
|
|
|
276510
276518
|
return;
|
|
276511
276519
|
}
|
|
276512
276520
|
this.path.render(context);
|
|
276513
|
-
if (localStorage.getItem("currentUser") === this.ownerId || !this.ownerId) {
|
|
276521
|
+
if (localStorage.getItem("currentUser") === this.ownerId || localStorage.getItem("screenOwnerId") === this.ownerId || !this.ownerId) {
|
|
276514
276522
|
super.render(context);
|
|
276515
276523
|
}
|
|
276516
276524
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "microboard-ui-temp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.125",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"i18next-browser-languagedetector": "^8.2.0",
|
|
67
67
|
"js-cookie": "^3.0.5",
|
|
68
68
|
"jwt-decode": "^4.0.0",
|
|
69
|
-
"microboard-temp": "^0.5.
|
|
69
|
+
"microboard-temp": "^0.5.52",
|
|
70
70
|
"nanoid": "^5.1.5",
|
|
71
71
|
"prop-types": "^15.8.1",
|
|
72
72
|
"react-hot-toast": "2.4.1",
|