microboard-ui-temp 0.0.48 → 0.0.50
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 +12 -9
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -227512,6 +227512,7 @@ class Comment {
|
|
|
227512
227512
|
subject = new Subject;
|
|
227513
227513
|
linkTo;
|
|
227514
227514
|
transformationRenderBlock = undefined;
|
|
227515
|
+
enableResize = true;
|
|
227515
227516
|
constructor(anchor = new Point2, events2, id = "") {
|
|
227516
227517
|
this.anchor = anchor;
|
|
227517
227518
|
this.events = events2;
|
|
@@ -229971,6 +229972,7 @@ class BaseItem extends Mbr {
|
|
|
229971
229972
|
shouldUseCustomRender = false;
|
|
229972
229973
|
shouldRenderOutsideViewRect = true;
|
|
229973
229974
|
shouldUseRelativeAlignment = true;
|
|
229975
|
+
enableResize = true;
|
|
229974
229976
|
itemType = "";
|
|
229975
229977
|
constructor(board, id = "", defaultItemData, isGroupItem) {
|
|
229976
229978
|
super();
|
|
@@ -255860,6 +255862,7 @@ class Card extends BaseItem {
|
|
|
255860
255862
|
backside = null;
|
|
255861
255863
|
imageToRender = null;
|
|
255862
255864
|
shouldUseCustomRender = false;
|
|
255865
|
+
enableResize = false;
|
|
255863
255866
|
constructor(board, id = "", urls) {
|
|
255864
255867
|
super(board, id, defaultCardData);
|
|
255865
255868
|
if (urls) {
|
|
@@ -255966,6 +255969,7 @@ class Deck extends BaseItem {
|
|
|
255966
255969
|
shouldUseCustomRender = false;
|
|
255967
255970
|
cachedCanvas = null;
|
|
255968
255971
|
isCacheDirty = true;
|
|
255972
|
+
enableResize = false;
|
|
255969
255973
|
constructor(board, id = "") {
|
|
255970
255974
|
super(board, id, defaultDeckData, true);
|
|
255971
255975
|
this.index.getUnderPoint = () => [];
|
|
@@ -256010,13 +256014,6 @@ class Deck extends BaseItem {
|
|
|
256010
256014
|
const foundItem = this.index?.getById(childId);
|
|
256011
256015
|
if (this.parent !== childId && this.getId() !== childId) {
|
|
256012
256016
|
if (foundItem) {
|
|
256013
|
-
foundItem.transformation.apply({
|
|
256014
|
-
class: "Transformation",
|
|
256015
|
-
method: "translateTo",
|
|
256016
|
-
item: [this.id],
|
|
256017
|
-
x: this.left,
|
|
256018
|
-
y: this.top - this.getHeight() / 2
|
|
256019
|
-
});
|
|
256020
256017
|
this.index?.remove(foundItem);
|
|
256021
256018
|
foundItem.parent = "Board";
|
|
256022
256019
|
foundItem.shouldUseRelativeAlignment = true;
|
|
@@ -256120,6 +256117,7 @@ class Deck extends BaseItem {
|
|
|
256120
256117
|
});
|
|
256121
256118
|
this.cachedCanvas = tempCanvas;
|
|
256122
256119
|
this.isCacheDirty = false;
|
|
256120
|
+
this.updateMbr();
|
|
256123
256121
|
}
|
|
256124
256122
|
}
|
|
256125
256123
|
registerItem({
|
|
@@ -259561,7 +259559,8 @@ class Transformer extends Tool {
|
|
|
259561
259559
|
return false;
|
|
259562
259560
|
}
|
|
259563
259561
|
const isLockedItems = this.selection.getIsLockedSelection();
|
|
259564
|
-
|
|
259562
|
+
const isResizeEnabled = this.selection.getIsResizeEnabled();
|
|
259563
|
+
if (isLockedItems || !isResizeEnabled) {
|
|
259565
259564
|
return false;
|
|
259566
259565
|
}
|
|
259567
259566
|
this.updateAnchorType();
|
|
@@ -260801,6 +260800,10 @@ class BoardSelection {
|
|
|
260801
260800
|
this.board.tools.getSelect()?.nestingHighlighter.clear();
|
|
260802
260801
|
this.setContext("None");
|
|
260803
260802
|
}
|
|
260803
|
+
getIsResizeEnabled() {
|
|
260804
|
+
const items = this.list();
|
|
260805
|
+
return !items.some((item) => !item.enableResize);
|
|
260806
|
+
}
|
|
260804
260807
|
getIsLockedSelection() {
|
|
260805
260808
|
const items = this.list();
|
|
260806
260809
|
return items.some((item) => item.transformation.isLocked);
|
|
@@ -262118,7 +262121,7 @@ class Board {
|
|
|
262118
262121
|
itemData.transformation.translateX = translateX - minX + x;
|
|
262119
262122
|
itemData.transformation.translateY = translateY - minY + y;
|
|
262120
262123
|
}
|
|
262121
|
-
if (itemData
|
|
262124
|
+
if ("children" in itemData && itemData.children) {
|
|
262122
262125
|
itemData.children = itemData.children.map((childId) => newItemIdMap[childId]);
|
|
262123
262126
|
}
|
|
262124
262127
|
newMap[newItemId] = itemData;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "microboard-ui-temp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.50",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"i18next-browser-languagedetector": "^8.2.0",
|
|
51
51
|
"js-cookie": "^3.0.5",
|
|
52
52
|
"jwt-decode": "^4.0.0",
|
|
53
|
-
"microboard-temp": "^0.4.
|
|
53
|
+
"microboard-temp": "^0.4.99",
|
|
54
54
|
"nanoid": "^5.1.5",
|
|
55
55
|
"prop-types": "^15.8.1",
|
|
56
56
|
"react-hot-toast": "2.4.1",
|