microboard-temp 0.5.149 → 0.5.151
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 +34 -6
- package/dist/cjs/index.js +34 -6
- package/dist/cjs/node.js +34 -6
- package/dist/esm/browser.js +34 -6
- package/dist/esm/index.js +34 -6
- package/dist/esm/node.js +34 -6
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -20853,11 +20853,8 @@ class SpatialIndex {
|
|
|
20853
20853
|
}
|
|
20854
20854
|
change = (item) => {
|
|
20855
20855
|
this.itemsIndex.change(item);
|
|
20856
|
-
|
|
20857
|
-
|
|
20858
|
-
} else {
|
|
20859
|
-
this.Mbr.combine([item.getMbrWithChildren()]);
|
|
20860
|
-
}
|
|
20856
|
+
this.Mbr = new Mbr;
|
|
20857
|
+
this.itemsArray.forEach((i) => this.Mbr.combine([i.getMbrWithChildren()]));
|
|
20861
20858
|
this.subject.publish(this.items);
|
|
20862
20859
|
};
|
|
20863
20860
|
remove(item) {
|
|
@@ -42240,7 +42237,38 @@ class ImageItem extends BaseItem {
|
|
|
42240
42237
|
this.storageLink = link2;
|
|
42241
42238
|
this.signedUrl = await getMediaSignedUrl(link2, this.board.getAccount()?.accessToken || null) || "";
|
|
42242
42239
|
if (!this.signedUrl) {
|
|
42243
|
-
|
|
42240
|
+
const canvas = conf.documentFactory.createElement("canvas");
|
|
42241
|
+
canvas.width = 100;
|
|
42242
|
+
canvas.height = 100;
|
|
42243
|
+
const ctx = canvas.getContext("2d");
|
|
42244
|
+
if (ctx) {
|
|
42245
|
+
ctx.fillStyle = "#f0f0f0";
|
|
42246
|
+
ctx.fillRect(0, 0, 100, 100);
|
|
42247
|
+
ctx.strokeStyle = "#bdbdbd";
|
|
42248
|
+
ctx.lineWidth = 2;
|
|
42249
|
+
ctx.strokeRect(1, 1, 98, 98);
|
|
42250
|
+
const x = 30, y = 34;
|
|
42251
|
+
ctx.strokeStyle = "#9e9e9e";
|
|
42252
|
+
ctx.lineWidth = 2.5;
|
|
42253
|
+
ctx.lineJoin = "round";
|
|
42254
|
+
ctx.strokeRect(x, y, 40, 32);
|
|
42255
|
+
ctx.beginPath();
|
|
42256
|
+
ctx.moveTo(x, y + 32);
|
|
42257
|
+
ctx.lineTo(x + 14, y + 14);
|
|
42258
|
+
ctx.lineTo(x + 24, y + 24);
|
|
42259
|
+
ctx.stroke();
|
|
42260
|
+
ctx.beginPath();
|
|
42261
|
+
ctx.moveTo(x + 24, y + 24);
|
|
42262
|
+
ctx.lineTo(x + 32, y + 16);
|
|
42263
|
+
ctx.lineTo(x + 40, y + 32);
|
|
42264
|
+
ctx.stroke();
|
|
42265
|
+
ctx.beginPath();
|
|
42266
|
+
ctx.arc(x + 31, y + 10, 5, 0, Math.PI * 2);
|
|
42267
|
+
ctx.stroke();
|
|
42268
|
+
}
|
|
42269
|
+
const placeholderImg = new Image;
|
|
42270
|
+
placeholderImg.src = canvas.toDataURL();
|
|
42271
|
+
this.setImage(placeholderImg);
|
|
42244
42272
|
this.updateMbr();
|
|
42245
42273
|
this.subject.publish(this);
|
|
42246
42274
|
this.shootLoadCallbacks();
|
package/dist/cjs/index.js
CHANGED
|
@@ -20853,11 +20853,8 @@ class SpatialIndex {
|
|
|
20853
20853
|
}
|
|
20854
20854
|
change = (item) => {
|
|
20855
20855
|
this.itemsIndex.change(item);
|
|
20856
|
-
|
|
20857
|
-
|
|
20858
|
-
} else {
|
|
20859
|
-
this.Mbr.combine([item.getMbrWithChildren()]);
|
|
20860
|
-
}
|
|
20856
|
+
this.Mbr = new Mbr;
|
|
20857
|
+
this.itemsArray.forEach((i) => this.Mbr.combine([i.getMbrWithChildren()]));
|
|
20861
20858
|
this.subject.publish(this.items);
|
|
20862
20859
|
};
|
|
20863
20860
|
remove(item) {
|
|
@@ -42240,7 +42237,38 @@ class ImageItem extends BaseItem {
|
|
|
42240
42237
|
this.storageLink = link2;
|
|
42241
42238
|
this.signedUrl = await getMediaSignedUrl(link2, this.board.getAccount()?.accessToken || null) || "";
|
|
42242
42239
|
if (!this.signedUrl) {
|
|
42243
|
-
|
|
42240
|
+
const canvas = conf.documentFactory.createElement("canvas");
|
|
42241
|
+
canvas.width = 100;
|
|
42242
|
+
canvas.height = 100;
|
|
42243
|
+
const ctx = canvas.getContext("2d");
|
|
42244
|
+
if (ctx) {
|
|
42245
|
+
ctx.fillStyle = "#f0f0f0";
|
|
42246
|
+
ctx.fillRect(0, 0, 100, 100);
|
|
42247
|
+
ctx.strokeStyle = "#bdbdbd";
|
|
42248
|
+
ctx.lineWidth = 2;
|
|
42249
|
+
ctx.strokeRect(1, 1, 98, 98);
|
|
42250
|
+
const x = 30, y = 34;
|
|
42251
|
+
ctx.strokeStyle = "#9e9e9e";
|
|
42252
|
+
ctx.lineWidth = 2.5;
|
|
42253
|
+
ctx.lineJoin = "round";
|
|
42254
|
+
ctx.strokeRect(x, y, 40, 32);
|
|
42255
|
+
ctx.beginPath();
|
|
42256
|
+
ctx.moveTo(x, y + 32);
|
|
42257
|
+
ctx.lineTo(x + 14, y + 14);
|
|
42258
|
+
ctx.lineTo(x + 24, y + 24);
|
|
42259
|
+
ctx.stroke();
|
|
42260
|
+
ctx.beginPath();
|
|
42261
|
+
ctx.moveTo(x + 24, y + 24);
|
|
42262
|
+
ctx.lineTo(x + 32, y + 16);
|
|
42263
|
+
ctx.lineTo(x + 40, y + 32);
|
|
42264
|
+
ctx.stroke();
|
|
42265
|
+
ctx.beginPath();
|
|
42266
|
+
ctx.arc(x + 31, y + 10, 5, 0, Math.PI * 2);
|
|
42267
|
+
ctx.stroke();
|
|
42268
|
+
}
|
|
42269
|
+
const placeholderImg = new Image;
|
|
42270
|
+
placeholderImg.src = canvas.toDataURL();
|
|
42271
|
+
this.setImage(placeholderImg);
|
|
42244
42272
|
this.updateMbr();
|
|
42245
42273
|
this.subject.publish(this);
|
|
42246
42274
|
this.shootLoadCallbacks();
|
package/dist/cjs/node.js
CHANGED
|
@@ -23325,11 +23325,8 @@ class SpatialIndex {
|
|
|
23325
23325
|
}
|
|
23326
23326
|
change = (item) => {
|
|
23327
23327
|
this.itemsIndex.change(item);
|
|
23328
|
-
|
|
23329
|
-
|
|
23330
|
-
} else {
|
|
23331
|
-
this.Mbr.combine([item.getMbrWithChildren()]);
|
|
23332
|
-
}
|
|
23328
|
+
this.Mbr = new Mbr;
|
|
23329
|
+
this.itemsArray.forEach((i) => this.Mbr.combine([i.getMbrWithChildren()]));
|
|
23333
23330
|
this.subject.publish(this.items);
|
|
23334
23331
|
};
|
|
23335
23332
|
remove(item) {
|
|
@@ -44713,7 +44710,38 @@ class ImageItem extends BaseItem {
|
|
|
44713
44710
|
this.storageLink = link2;
|
|
44714
44711
|
this.signedUrl = await getMediaSignedUrl(link2, this.board.getAccount()?.accessToken || null) || "";
|
|
44715
44712
|
if (!this.signedUrl) {
|
|
44716
|
-
|
|
44713
|
+
const canvas = conf.documentFactory.createElement("canvas");
|
|
44714
|
+
canvas.width = 100;
|
|
44715
|
+
canvas.height = 100;
|
|
44716
|
+
const ctx = canvas.getContext("2d");
|
|
44717
|
+
if (ctx) {
|
|
44718
|
+
ctx.fillStyle = "#f0f0f0";
|
|
44719
|
+
ctx.fillRect(0, 0, 100, 100);
|
|
44720
|
+
ctx.strokeStyle = "#bdbdbd";
|
|
44721
|
+
ctx.lineWidth = 2;
|
|
44722
|
+
ctx.strokeRect(1, 1, 98, 98);
|
|
44723
|
+
const x = 30, y = 34;
|
|
44724
|
+
ctx.strokeStyle = "#9e9e9e";
|
|
44725
|
+
ctx.lineWidth = 2.5;
|
|
44726
|
+
ctx.lineJoin = "round";
|
|
44727
|
+
ctx.strokeRect(x, y, 40, 32);
|
|
44728
|
+
ctx.beginPath();
|
|
44729
|
+
ctx.moveTo(x, y + 32);
|
|
44730
|
+
ctx.lineTo(x + 14, y + 14);
|
|
44731
|
+
ctx.lineTo(x + 24, y + 24);
|
|
44732
|
+
ctx.stroke();
|
|
44733
|
+
ctx.beginPath();
|
|
44734
|
+
ctx.moveTo(x + 24, y + 24);
|
|
44735
|
+
ctx.lineTo(x + 32, y + 16);
|
|
44736
|
+
ctx.lineTo(x + 40, y + 32);
|
|
44737
|
+
ctx.stroke();
|
|
44738
|
+
ctx.beginPath();
|
|
44739
|
+
ctx.arc(x + 31, y + 10, 5, 0, Math.PI * 2);
|
|
44740
|
+
ctx.stroke();
|
|
44741
|
+
}
|
|
44742
|
+
const placeholderImg = new Image;
|
|
44743
|
+
placeholderImg.src = canvas.toDataURL();
|
|
44744
|
+
this.setImage(placeholderImg);
|
|
44717
44745
|
this.updateMbr();
|
|
44718
44746
|
this.subject.publish(this);
|
|
44719
44747
|
this.shootLoadCallbacks();
|
package/dist/esm/browser.js
CHANGED
|
@@ -20696,11 +20696,8 @@ class SpatialIndex {
|
|
|
20696
20696
|
}
|
|
20697
20697
|
change = (item) => {
|
|
20698
20698
|
this.itemsIndex.change(item);
|
|
20699
|
-
|
|
20700
|
-
|
|
20701
|
-
} else {
|
|
20702
|
-
this.Mbr.combine([item.getMbrWithChildren()]);
|
|
20703
|
-
}
|
|
20699
|
+
this.Mbr = new Mbr;
|
|
20700
|
+
this.itemsArray.forEach((i) => this.Mbr.combine([i.getMbrWithChildren()]));
|
|
20704
20701
|
this.subject.publish(this.items);
|
|
20705
20702
|
};
|
|
20706
20703
|
remove(item) {
|
|
@@ -42083,7 +42080,38 @@ class ImageItem extends BaseItem {
|
|
|
42083
42080
|
this.storageLink = link2;
|
|
42084
42081
|
this.signedUrl = await getMediaSignedUrl(link2, this.board.getAccount()?.accessToken || null) || "";
|
|
42085
42082
|
if (!this.signedUrl) {
|
|
42086
|
-
|
|
42083
|
+
const canvas = conf.documentFactory.createElement("canvas");
|
|
42084
|
+
canvas.width = 100;
|
|
42085
|
+
canvas.height = 100;
|
|
42086
|
+
const ctx = canvas.getContext("2d");
|
|
42087
|
+
if (ctx) {
|
|
42088
|
+
ctx.fillStyle = "#f0f0f0";
|
|
42089
|
+
ctx.fillRect(0, 0, 100, 100);
|
|
42090
|
+
ctx.strokeStyle = "#bdbdbd";
|
|
42091
|
+
ctx.lineWidth = 2;
|
|
42092
|
+
ctx.strokeRect(1, 1, 98, 98);
|
|
42093
|
+
const x = 30, y = 34;
|
|
42094
|
+
ctx.strokeStyle = "#9e9e9e";
|
|
42095
|
+
ctx.lineWidth = 2.5;
|
|
42096
|
+
ctx.lineJoin = "round";
|
|
42097
|
+
ctx.strokeRect(x, y, 40, 32);
|
|
42098
|
+
ctx.beginPath();
|
|
42099
|
+
ctx.moveTo(x, y + 32);
|
|
42100
|
+
ctx.lineTo(x + 14, y + 14);
|
|
42101
|
+
ctx.lineTo(x + 24, y + 24);
|
|
42102
|
+
ctx.stroke();
|
|
42103
|
+
ctx.beginPath();
|
|
42104
|
+
ctx.moveTo(x + 24, y + 24);
|
|
42105
|
+
ctx.lineTo(x + 32, y + 16);
|
|
42106
|
+
ctx.lineTo(x + 40, y + 32);
|
|
42107
|
+
ctx.stroke();
|
|
42108
|
+
ctx.beginPath();
|
|
42109
|
+
ctx.arc(x + 31, y + 10, 5, 0, Math.PI * 2);
|
|
42110
|
+
ctx.stroke();
|
|
42111
|
+
}
|
|
42112
|
+
const placeholderImg = new Image;
|
|
42113
|
+
placeholderImg.src = canvas.toDataURL();
|
|
42114
|
+
this.setImage(placeholderImg);
|
|
42087
42115
|
this.updateMbr();
|
|
42088
42116
|
this.subject.publish(this);
|
|
42089
42117
|
this.shootLoadCallbacks();
|
package/dist/esm/index.js
CHANGED
|
@@ -20689,11 +20689,8 @@ class SpatialIndex {
|
|
|
20689
20689
|
}
|
|
20690
20690
|
change = (item) => {
|
|
20691
20691
|
this.itemsIndex.change(item);
|
|
20692
|
-
|
|
20693
|
-
|
|
20694
|
-
} else {
|
|
20695
|
-
this.Mbr.combine([item.getMbrWithChildren()]);
|
|
20696
|
-
}
|
|
20692
|
+
this.Mbr = new Mbr;
|
|
20693
|
+
this.itemsArray.forEach((i) => this.Mbr.combine([i.getMbrWithChildren()]));
|
|
20697
20694
|
this.subject.publish(this.items);
|
|
20698
20695
|
};
|
|
20699
20696
|
remove(item) {
|
|
@@ -42076,7 +42073,38 @@ class ImageItem extends BaseItem {
|
|
|
42076
42073
|
this.storageLink = link2;
|
|
42077
42074
|
this.signedUrl = await getMediaSignedUrl(link2, this.board.getAccount()?.accessToken || null) || "";
|
|
42078
42075
|
if (!this.signedUrl) {
|
|
42079
|
-
|
|
42076
|
+
const canvas = conf.documentFactory.createElement("canvas");
|
|
42077
|
+
canvas.width = 100;
|
|
42078
|
+
canvas.height = 100;
|
|
42079
|
+
const ctx = canvas.getContext("2d");
|
|
42080
|
+
if (ctx) {
|
|
42081
|
+
ctx.fillStyle = "#f0f0f0";
|
|
42082
|
+
ctx.fillRect(0, 0, 100, 100);
|
|
42083
|
+
ctx.strokeStyle = "#bdbdbd";
|
|
42084
|
+
ctx.lineWidth = 2;
|
|
42085
|
+
ctx.strokeRect(1, 1, 98, 98);
|
|
42086
|
+
const x = 30, y = 34;
|
|
42087
|
+
ctx.strokeStyle = "#9e9e9e";
|
|
42088
|
+
ctx.lineWidth = 2.5;
|
|
42089
|
+
ctx.lineJoin = "round";
|
|
42090
|
+
ctx.strokeRect(x, y, 40, 32);
|
|
42091
|
+
ctx.beginPath();
|
|
42092
|
+
ctx.moveTo(x, y + 32);
|
|
42093
|
+
ctx.lineTo(x + 14, y + 14);
|
|
42094
|
+
ctx.lineTo(x + 24, y + 24);
|
|
42095
|
+
ctx.stroke();
|
|
42096
|
+
ctx.beginPath();
|
|
42097
|
+
ctx.moveTo(x + 24, y + 24);
|
|
42098
|
+
ctx.lineTo(x + 32, y + 16);
|
|
42099
|
+
ctx.lineTo(x + 40, y + 32);
|
|
42100
|
+
ctx.stroke();
|
|
42101
|
+
ctx.beginPath();
|
|
42102
|
+
ctx.arc(x + 31, y + 10, 5, 0, Math.PI * 2);
|
|
42103
|
+
ctx.stroke();
|
|
42104
|
+
}
|
|
42105
|
+
const placeholderImg = new Image;
|
|
42106
|
+
placeholderImg.src = canvas.toDataURL();
|
|
42107
|
+
this.setImage(placeholderImg);
|
|
42080
42108
|
this.updateMbr();
|
|
42081
42109
|
this.subject.publish(this);
|
|
42082
42110
|
this.shootLoadCallbacks();
|
package/dist/esm/node.js
CHANGED
|
@@ -23156,11 +23156,8 @@ class SpatialIndex {
|
|
|
23156
23156
|
}
|
|
23157
23157
|
change = (item) => {
|
|
23158
23158
|
this.itemsIndex.change(item);
|
|
23159
|
-
|
|
23160
|
-
|
|
23161
|
-
} else {
|
|
23162
|
-
this.Mbr.combine([item.getMbrWithChildren()]);
|
|
23163
|
-
}
|
|
23159
|
+
this.Mbr = new Mbr;
|
|
23160
|
+
this.itemsArray.forEach((i) => this.Mbr.combine([i.getMbrWithChildren()]));
|
|
23164
23161
|
this.subject.publish(this.items);
|
|
23165
23162
|
};
|
|
23166
23163
|
remove(item) {
|
|
@@ -44544,7 +44541,38 @@ class ImageItem extends BaseItem {
|
|
|
44544
44541
|
this.storageLink = link2;
|
|
44545
44542
|
this.signedUrl = await getMediaSignedUrl(link2, this.board.getAccount()?.accessToken || null) || "";
|
|
44546
44543
|
if (!this.signedUrl) {
|
|
44547
|
-
|
|
44544
|
+
const canvas = conf.documentFactory.createElement("canvas");
|
|
44545
|
+
canvas.width = 100;
|
|
44546
|
+
canvas.height = 100;
|
|
44547
|
+
const ctx = canvas.getContext("2d");
|
|
44548
|
+
if (ctx) {
|
|
44549
|
+
ctx.fillStyle = "#f0f0f0";
|
|
44550
|
+
ctx.fillRect(0, 0, 100, 100);
|
|
44551
|
+
ctx.strokeStyle = "#bdbdbd";
|
|
44552
|
+
ctx.lineWidth = 2;
|
|
44553
|
+
ctx.strokeRect(1, 1, 98, 98);
|
|
44554
|
+
const x = 30, y = 34;
|
|
44555
|
+
ctx.strokeStyle = "#9e9e9e";
|
|
44556
|
+
ctx.lineWidth = 2.5;
|
|
44557
|
+
ctx.lineJoin = "round";
|
|
44558
|
+
ctx.strokeRect(x, y, 40, 32);
|
|
44559
|
+
ctx.beginPath();
|
|
44560
|
+
ctx.moveTo(x, y + 32);
|
|
44561
|
+
ctx.lineTo(x + 14, y + 14);
|
|
44562
|
+
ctx.lineTo(x + 24, y + 24);
|
|
44563
|
+
ctx.stroke();
|
|
44564
|
+
ctx.beginPath();
|
|
44565
|
+
ctx.moveTo(x + 24, y + 24);
|
|
44566
|
+
ctx.lineTo(x + 32, y + 16);
|
|
44567
|
+
ctx.lineTo(x + 40, y + 32);
|
|
44568
|
+
ctx.stroke();
|
|
44569
|
+
ctx.beginPath();
|
|
44570
|
+
ctx.arc(x + 31, y + 10, 5, 0, Math.PI * 2);
|
|
44571
|
+
ctx.stroke();
|
|
44572
|
+
}
|
|
44573
|
+
const placeholderImg = new Image;
|
|
44574
|
+
placeholderImg.src = canvas.toDataURL();
|
|
44575
|
+
this.setImage(placeholderImg);
|
|
44548
44576
|
this.updateMbr();
|
|
44549
44577
|
this.subject.publish(this);
|
|
44550
44578
|
this.shootLoadCallbacks();
|