microboard-temp 0.13.46 → 0.13.48
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 +14 -6
- package/dist/cjs/index.js +14 -6
- package/dist/cjs/node.js +14 -6
- package/dist/esm/browser.js +14 -6
- package/dist/esm/index.js +14 -6
- package/dist/esm/node.js +14 -6
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -60511,6 +60511,8 @@ class GravityEngine {
|
|
|
60511
60511
|
return false;
|
|
60512
60512
|
if (item.parent !== "Board" && draggedIds.has(item.parent))
|
|
60513
60513
|
return false;
|
|
60514
|
+
if (this.board.isNodeInForceGraph(item.getId()))
|
|
60515
|
+
return false;
|
|
60514
60516
|
return true;
|
|
60515
60517
|
});
|
|
60516
60518
|
if (items.length < 1)
|
|
@@ -60613,25 +60615,30 @@ class GravityEngine {
|
|
|
60613
60615
|
return false;
|
|
60614
60616
|
if (item.parent !== "Board" && draggedIds.has(item.parent))
|
|
60615
60617
|
return false;
|
|
60618
|
+
if (this.board.isNodeInForceGraph(item.getId()))
|
|
60619
|
+
return false;
|
|
60616
60620
|
return true;
|
|
60617
60621
|
});
|
|
60618
60622
|
if (items.length === 0)
|
|
60619
60623
|
return;
|
|
60620
|
-
const
|
|
60624
|
+
const toSend = [];
|
|
60625
|
+
for (const item of items) {
|
|
60621
60626
|
const id = item.getId();
|
|
60622
60627
|
const pos = item.transformation.getTranslation();
|
|
60623
60628
|
const last = this.lastSyncedPositions.get(id);
|
|
60624
60629
|
const dx = last ? pos.x - last.x : 0;
|
|
60625
60630
|
const dy = last ? pos.y - last.y : 0;
|
|
60626
|
-
|
|
60627
|
-
|
|
60628
|
-
|
|
60629
|
-
|
|
60631
|
+
if (Math.abs(dx) > 0.5 || Math.abs(dy) > 0.5) {
|
|
60632
|
+
toSend.push({ id, dx, dy });
|
|
60633
|
+
this.lastSyncedPositions.set(id, { x: pos.x, y: pos.y });
|
|
60634
|
+
}
|
|
60635
|
+
}
|
|
60636
|
+
if (toSend.length === 0)
|
|
60630
60637
|
return;
|
|
60631
60638
|
const operation = {
|
|
60632
60639
|
class: "Transformation",
|
|
60633
60640
|
method: "applyMatrix",
|
|
60634
|
-
items:
|
|
60641
|
+
items: toSend.map(({ id, dx, dy }) => ({
|
|
60635
60642
|
id,
|
|
60636
60643
|
matrix: { translateX: dx, translateY: dy, scaleX: 1, scaleY: 1, shearX: 0, shearY: 0 }
|
|
60637
60644
|
}))
|
|
@@ -60751,6 +60758,7 @@ class ForceGraphEngine {
|
|
|
60751
60758
|
wake() {
|
|
60752
60759
|
if (this.activeComponents.size === 0)
|
|
60753
60760
|
return;
|
|
60761
|
+
this.syncPositions();
|
|
60754
60762
|
const activeIds = this.getActiveNodeIds();
|
|
60755
60763
|
for (const item of this.board.items.listAll()) {
|
|
60756
60764
|
if (!activeIds.has(item.getId()))
|
package/dist/cjs/index.js
CHANGED
|
@@ -60511,6 +60511,8 @@ class GravityEngine {
|
|
|
60511
60511
|
return false;
|
|
60512
60512
|
if (item.parent !== "Board" && draggedIds.has(item.parent))
|
|
60513
60513
|
return false;
|
|
60514
|
+
if (this.board.isNodeInForceGraph(item.getId()))
|
|
60515
|
+
return false;
|
|
60514
60516
|
return true;
|
|
60515
60517
|
});
|
|
60516
60518
|
if (items.length < 1)
|
|
@@ -60613,25 +60615,30 @@ class GravityEngine {
|
|
|
60613
60615
|
return false;
|
|
60614
60616
|
if (item.parent !== "Board" && draggedIds.has(item.parent))
|
|
60615
60617
|
return false;
|
|
60618
|
+
if (this.board.isNodeInForceGraph(item.getId()))
|
|
60619
|
+
return false;
|
|
60616
60620
|
return true;
|
|
60617
60621
|
});
|
|
60618
60622
|
if (items.length === 0)
|
|
60619
60623
|
return;
|
|
60620
|
-
const
|
|
60624
|
+
const toSend = [];
|
|
60625
|
+
for (const item of items) {
|
|
60621
60626
|
const id = item.getId();
|
|
60622
60627
|
const pos = item.transformation.getTranslation();
|
|
60623
60628
|
const last = this.lastSyncedPositions.get(id);
|
|
60624
60629
|
const dx = last ? pos.x - last.x : 0;
|
|
60625
60630
|
const dy = last ? pos.y - last.y : 0;
|
|
60626
|
-
|
|
60627
|
-
|
|
60628
|
-
|
|
60629
|
-
|
|
60631
|
+
if (Math.abs(dx) > 0.5 || Math.abs(dy) > 0.5) {
|
|
60632
|
+
toSend.push({ id, dx, dy });
|
|
60633
|
+
this.lastSyncedPositions.set(id, { x: pos.x, y: pos.y });
|
|
60634
|
+
}
|
|
60635
|
+
}
|
|
60636
|
+
if (toSend.length === 0)
|
|
60630
60637
|
return;
|
|
60631
60638
|
const operation = {
|
|
60632
60639
|
class: "Transformation",
|
|
60633
60640
|
method: "applyMatrix",
|
|
60634
|
-
items:
|
|
60641
|
+
items: toSend.map(({ id, dx, dy }) => ({
|
|
60635
60642
|
id,
|
|
60636
60643
|
matrix: { translateX: dx, translateY: dy, scaleX: 1, scaleY: 1, shearX: 0, shearY: 0 }
|
|
60637
60644
|
}))
|
|
@@ -60751,6 +60758,7 @@ class ForceGraphEngine {
|
|
|
60751
60758
|
wake() {
|
|
60752
60759
|
if (this.activeComponents.size === 0)
|
|
60753
60760
|
return;
|
|
60761
|
+
this.syncPositions();
|
|
60754
60762
|
const activeIds = this.getActiveNodeIds();
|
|
60755
60763
|
for (const item of this.board.items.listAll()) {
|
|
60756
60764
|
if (!activeIds.has(item.getId()))
|
package/dist/cjs/node.js
CHANGED
|
@@ -62986,6 +62986,8 @@ class GravityEngine {
|
|
|
62986
62986
|
return false;
|
|
62987
62987
|
if (item.parent !== "Board" && draggedIds.has(item.parent))
|
|
62988
62988
|
return false;
|
|
62989
|
+
if (this.board.isNodeInForceGraph(item.getId()))
|
|
62990
|
+
return false;
|
|
62989
62991
|
return true;
|
|
62990
62992
|
});
|
|
62991
62993
|
if (items.length < 1)
|
|
@@ -63088,25 +63090,30 @@ class GravityEngine {
|
|
|
63088
63090
|
return false;
|
|
63089
63091
|
if (item.parent !== "Board" && draggedIds.has(item.parent))
|
|
63090
63092
|
return false;
|
|
63093
|
+
if (this.board.isNodeInForceGraph(item.getId()))
|
|
63094
|
+
return false;
|
|
63091
63095
|
return true;
|
|
63092
63096
|
});
|
|
63093
63097
|
if (items.length === 0)
|
|
63094
63098
|
return;
|
|
63095
|
-
const
|
|
63099
|
+
const toSend = [];
|
|
63100
|
+
for (const item of items) {
|
|
63096
63101
|
const id = item.getId();
|
|
63097
63102
|
const pos = item.transformation.getTranslation();
|
|
63098
63103
|
const last = this.lastSyncedPositions.get(id);
|
|
63099
63104
|
const dx = last ? pos.x - last.x : 0;
|
|
63100
63105
|
const dy = last ? pos.y - last.y : 0;
|
|
63101
|
-
|
|
63102
|
-
|
|
63103
|
-
|
|
63104
|
-
|
|
63106
|
+
if (Math.abs(dx) > 0.5 || Math.abs(dy) > 0.5) {
|
|
63107
|
+
toSend.push({ id, dx, dy });
|
|
63108
|
+
this.lastSyncedPositions.set(id, { x: pos.x, y: pos.y });
|
|
63109
|
+
}
|
|
63110
|
+
}
|
|
63111
|
+
if (toSend.length === 0)
|
|
63105
63112
|
return;
|
|
63106
63113
|
const operation = {
|
|
63107
63114
|
class: "Transformation",
|
|
63108
63115
|
method: "applyMatrix",
|
|
63109
|
-
items:
|
|
63116
|
+
items: toSend.map(({ id, dx, dy }) => ({
|
|
63110
63117
|
id,
|
|
63111
63118
|
matrix: { translateX: dx, translateY: dy, scaleX: 1, scaleY: 1, shearX: 0, shearY: 0 }
|
|
63112
63119
|
}))
|
|
@@ -63226,6 +63233,7 @@ class ForceGraphEngine {
|
|
|
63226
63233
|
wake() {
|
|
63227
63234
|
if (this.activeComponents.size === 0)
|
|
63228
63235
|
return;
|
|
63236
|
+
this.syncPositions();
|
|
63229
63237
|
const activeIds = this.getActiveNodeIds();
|
|
63230
63238
|
for (const item of this.board.items.listAll()) {
|
|
63231
63239
|
if (!activeIds.has(item.getId()))
|
package/dist/esm/browser.js
CHANGED
|
@@ -60254,6 +60254,8 @@ class GravityEngine {
|
|
|
60254
60254
|
return false;
|
|
60255
60255
|
if (item.parent !== "Board" && draggedIds.has(item.parent))
|
|
60256
60256
|
return false;
|
|
60257
|
+
if (this.board.isNodeInForceGraph(item.getId()))
|
|
60258
|
+
return false;
|
|
60257
60259
|
return true;
|
|
60258
60260
|
});
|
|
60259
60261
|
if (items.length < 1)
|
|
@@ -60356,25 +60358,30 @@ class GravityEngine {
|
|
|
60356
60358
|
return false;
|
|
60357
60359
|
if (item.parent !== "Board" && draggedIds.has(item.parent))
|
|
60358
60360
|
return false;
|
|
60361
|
+
if (this.board.isNodeInForceGraph(item.getId()))
|
|
60362
|
+
return false;
|
|
60359
60363
|
return true;
|
|
60360
60364
|
});
|
|
60361
60365
|
if (items.length === 0)
|
|
60362
60366
|
return;
|
|
60363
|
-
const
|
|
60367
|
+
const toSend = [];
|
|
60368
|
+
for (const item of items) {
|
|
60364
60369
|
const id = item.getId();
|
|
60365
60370
|
const pos = item.transformation.getTranslation();
|
|
60366
60371
|
const last = this.lastSyncedPositions.get(id);
|
|
60367
60372
|
const dx = last ? pos.x - last.x : 0;
|
|
60368
60373
|
const dy = last ? pos.y - last.y : 0;
|
|
60369
|
-
|
|
60370
|
-
|
|
60371
|
-
|
|
60372
|
-
|
|
60374
|
+
if (Math.abs(dx) > 0.5 || Math.abs(dy) > 0.5) {
|
|
60375
|
+
toSend.push({ id, dx, dy });
|
|
60376
|
+
this.lastSyncedPositions.set(id, { x: pos.x, y: pos.y });
|
|
60377
|
+
}
|
|
60378
|
+
}
|
|
60379
|
+
if (toSend.length === 0)
|
|
60373
60380
|
return;
|
|
60374
60381
|
const operation = {
|
|
60375
60382
|
class: "Transformation",
|
|
60376
60383
|
method: "applyMatrix",
|
|
60377
|
-
items:
|
|
60384
|
+
items: toSend.map(({ id, dx, dy }) => ({
|
|
60378
60385
|
id,
|
|
60379
60386
|
matrix: { translateX: dx, translateY: dy, scaleX: 1, scaleY: 1, shearX: 0, shearY: 0 }
|
|
60380
60387
|
}))
|
|
@@ -60494,6 +60501,7 @@ class ForceGraphEngine {
|
|
|
60494
60501
|
wake() {
|
|
60495
60502
|
if (this.activeComponents.size === 0)
|
|
60496
60503
|
return;
|
|
60504
|
+
this.syncPositions();
|
|
60497
60505
|
const activeIds = this.getActiveNodeIds();
|
|
60498
60506
|
for (const item of this.board.items.listAll()) {
|
|
60499
60507
|
if (!activeIds.has(item.getId()))
|
package/dist/esm/index.js
CHANGED
|
@@ -60247,6 +60247,8 @@ class GravityEngine {
|
|
|
60247
60247
|
return false;
|
|
60248
60248
|
if (item.parent !== "Board" && draggedIds.has(item.parent))
|
|
60249
60249
|
return false;
|
|
60250
|
+
if (this.board.isNodeInForceGraph(item.getId()))
|
|
60251
|
+
return false;
|
|
60250
60252
|
return true;
|
|
60251
60253
|
});
|
|
60252
60254
|
if (items.length < 1)
|
|
@@ -60349,25 +60351,30 @@ class GravityEngine {
|
|
|
60349
60351
|
return false;
|
|
60350
60352
|
if (item.parent !== "Board" && draggedIds.has(item.parent))
|
|
60351
60353
|
return false;
|
|
60354
|
+
if (this.board.isNodeInForceGraph(item.getId()))
|
|
60355
|
+
return false;
|
|
60352
60356
|
return true;
|
|
60353
60357
|
});
|
|
60354
60358
|
if (items.length === 0)
|
|
60355
60359
|
return;
|
|
60356
|
-
const
|
|
60360
|
+
const toSend = [];
|
|
60361
|
+
for (const item of items) {
|
|
60357
60362
|
const id = item.getId();
|
|
60358
60363
|
const pos = item.transformation.getTranslation();
|
|
60359
60364
|
const last = this.lastSyncedPositions.get(id);
|
|
60360
60365
|
const dx = last ? pos.x - last.x : 0;
|
|
60361
60366
|
const dy = last ? pos.y - last.y : 0;
|
|
60362
|
-
|
|
60363
|
-
|
|
60364
|
-
|
|
60365
|
-
|
|
60367
|
+
if (Math.abs(dx) > 0.5 || Math.abs(dy) > 0.5) {
|
|
60368
|
+
toSend.push({ id, dx, dy });
|
|
60369
|
+
this.lastSyncedPositions.set(id, { x: pos.x, y: pos.y });
|
|
60370
|
+
}
|
|
60371
|
+
}
|
|
60372
|
+
if (toSend.length === 0)
|
|
60366
60373
|
return;
|
|
60367
60374
|
const operation = {
|
|
60368
60375
|
class: "Transformation",
|
|
60369
60376
|
method: "applyMatrix",
|
|
60370
|
-
items:
|
|
60377
|
+
items: toSend.map(({ id, dx, dy }) => ({
|
|
60371
60378
|
id,
|
|
60372
60379
|
matrix: { translateX: dx, translateY: dy, scaleX: 1, scaleY: 1, shearX: 0, shearY: 0 }
|
|
60373
60380
|
}))
|
|
@@ -60487,6 +60494,7 @@ class ForceGraphEngine {
|
|
|
60487
60494
|
wake() {
|
|
60488
60495
|
if (this.activeComponents.size === 0)
|
|
60489
60496
|
return;
|
|
60497
|
+
this.syncPositions();
|
|
60490
60498
|
const activeIds = this.getActiveNodeIds();
|
|
60491
60499
|
for (const item of this.board.items.listAll()) {
|
|
60492
60500
|
if (!activeIds.has(item.getId()))
|
package/dist/esm/node.js
CHANGED
|
@@ -62711,6 +62711,8 @@ class GravityEngine {
|
|
|
62711
62711
|
return false;
|
|
62712
62712
|
if (item.parent !== "Board" && draggedIds.has(item.parent))
|
|
62713
62713
|
return false;
|
|
62714
|
+
if (this.board.isNodeInForceGraph(item.getId()))
|
|
62715
|
+
return false;
|
|
62714
62716
|
return true;
|
|
62715
62717
|
});
|
|
62716
62718
|
if (items.length < 1)
|
|
@@ -62813,25 +62815,30 @@ class GravityEngine {
|
|
|
62813
62815
|
return false;
|
|
62814
62816
|
if (item.parent !== "Board" && draggedIds.has(item.parent))
|
|
62815
62817
|
return false;
|
|
62818
|
+
if (this.board.isNodeInForceGraph(item.getId()))
|
|
62819
|
+
return false;
|
|
62816
62820
|
return true;
|
|
62817
62821
|
});
|
|
62818
62822
|
if (items.length === 0)
|
|
62819
62823
|
return;
|
|
62820
|
-
const
|
|
62824
|
+
const toSend = [];
|
|
62825
|
+
for (const item of items) {
|
|
62821
62826
|
const id = item.getId();
|
|
62822
62827
|
const pos = item.transformation.getTranslation();
|
|
62823
62828
|
const last = this.lastSyncedPositions.get(id);
|
|
62824
62829
|
const dx = last ? pos.x - last.x : 0;
|
|
62825
62830
|
const dy = last ? pos.y - last.y : 0;
|
|
62826
|
-
|
|
62827
|
-
|
|
62828
|
-
|
|
62829
|
-
|
|
62831
|
+
if (Math.abs(dx) > 0.5 || Math.abs(dy) > 0.5) {
|
|
62832
|
+
toSend.push({ id, dx, dy });
|
|
62833
|
+
this.lastSyncedPositions.set(id, { x: pos.x, y: pos.y });
|
|
62834
|
+
}
|
|
62835
|
+
}
|
|
62836
|
+
if (toSend.length === 0)
|
|
62830
62837
|
return;
|
|
62831
62838
|
const operation = {
|
|
62832
62839
|
class: "Transformation",
|
|
62833
62840
|
method: "applyMatrix",
|
|
62834
|
-
items:
|
|
62841
|
+
items: toSend.map(({ id, dx, dy }) => ({
|
|
62835
62842
|
id,
|
|
62836
62843
|
matrix: { translateX: dx, translateY: dy, scaleX: 1, scaleY: 1, shearX: 0, shearY: 0 }
|
|
62837
62844
|
}))
|
|
@@ -62951,6 +62958,7 @@ class ForceGraphEngine {
|
|
|
62951
62958
|
wake() {
|
|
62952
62959
|
if (this.activeComponents.size === 0)
|
|
62953
62960
|
return;
|
|
62961
|
+
this.syncPositions();
|
|
62954
62962
|
const activeIds = this.getActiveNodeIds();
|
|
62955
62963
|
for (const item of this.board.items.listAll()) {
|
|
62956
62964
|
if (!activeIds.has(item.getId()))
|