microboard-temp 0.5.34 → 0.5.36
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 +20 -15
- package/dist/cjs/index.js +20 -15
- package/dist/cjs/node.js +20 -15
- package/dist/esm/browser.js +20 -15
- package/dist/esm/index.js +20 -15
- package/dist/esm/node.js +20 -15
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -21044,14 +21044,13 @@ class SpatialIndex {
|
|
|
21044
21044
|
return this.Mbr;
|
|
21045
21045
|
}
|
|
21046
21046
|
getNearestTo(point3, maxItems, filter, maxDistance) {
|
|
21047
|
-
const
|
|
21048
|
-
|
|
21049
|
-
|
|
21050
|
-
|
|
21051
|
-
|
|
21052
|
-
})
|
|
21053
|
-
|
|
21054
|
-
return withDistance.slice(0, maxItems).map(({ item }) => item);
|
|
21047
|
+
const nearestItems = this.itemsIndex.getNearestTo(point3, maxItems, filter, maxDistance);
|
|
21048
|
+
nearestItems.sort((aa, bb) => {
|
|
21049
|
+
const distA = point3.getDistance(aa.getMbr().getCenter());
|
|
21050
|
+
const distB = point3.getDistance(bb.getMbr().getCenter());
|
|
21051
|
+
return distA - distB;
|
|
21052
|
+
});
|
|
21053
|
+
return nearestItems.slice(0, maxItems);
|
|
21055
21054
|
}
|
|
21056
21055
|
list() {
|
|
21057
21056
|
return this.getItemsWithIncludedChildren(this.itemsArray).concat();
|
|
@@ -51254,13 +51253,19 @@ class ConnectorTransformer extends Tool {
|
|
|
51254
51253
|
this.snap.connector = connector;
|
|
51255
51254
|
this.snap.pointerMove();
|
|
51256
51255
|
const point5 = this.snap.getControlPoint();
|
|
51257
|
-
|
|
51258
|
-
start:
|
|
51259
|
-
|
|
51260
|
-
|
|
51261
|
-
|
|
51262
|
-
|
|
51263
|
-
|
|
51256
|
+
switch (this.statePointer) {
|
|
51257
|
+
case "start":
|
|
51258
|
+
connector.setStartPoint(point5, this.beginTimeStamp);
|
|
51259
|
+
this.selection.subject.publish(this.selection);
|
|
51260
|
+
break;
|
|
51261
|
+
case "end":
|
|
51262
|
+
connector.setEndPoint(point5, this.beginTimeStamp);
|
|
51263
|
+
this.selection.subject.publish(this.selection);
|
|
51264
|
+
break;
|
|
51265
|
+
case "middle":
|
|
51266
|
+
connector.setMiddlePoint(point5, this.beginTimeStamp);
|
|
51267
|
+
break;
|
|
51268
|
+
}
|
|
51264
51269
|
this.selection.subject.publish(this.selection);
|
|
51265
51270
|
}
|
|
51266
51271
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -21044,14 +21044,13 @@ class SpatialIndex {
|
|
|
21044
21044
|
return this.Mbr;
|
|
21045
21045
|
}
|
|
21046
21046
|
getNearestTo(point3, maxItems, filter, maxDistance) {
|
|
21047
|
-
const
|
|
21048
|
-
|
|
21049
|
-
|
|
21050
|
-
|
|
21051
|
-
|
|
21052
|
-
})
|
|
21053
|
-
|
|
21054
|
-
return withDistance.slice(0, maxItems).map(({ item }) => item);
|
|
21047
|
+
const nearestItems = this.itemsIndex.getNearestTo(point3, maxItems, filter, maxDistance);
|
|
21048
|
+
nearestItems.sort((aa, bb) => {
|
|
21049
|
+
const distA = point3.getDistance(aa.getMbr().getCenter());
|
|
21050
|
+
const distB = point3.getDistance(bb.getMbr().getCenter());
|
|
21051
|
+
return distA - distB;
|
|
21052
|
+
});
|
|
21053
|
+
return nearestItems.slice(0, maxItems);
|
|
21055
21054
|
}
|
|
21056
21055
|
list() {
|
|
21057
21056
|
return this.getItemsWithIncludedChildren(this.itemsArray).concat();
|
|
@@ -51254,13 +51253,19 @@ class ConnectorTransformer extends Tool {
|
|
|
51254
51253
|
this.snap.connector = connector;
|
|
51255
51254
|
this.snap.pointerMove();
|
|
51256
51255
|
const point5 = this.snap.getControlPoint();
|
|
51257
|
-
|
|
51258
|
-
start:
|
|
51259
|
-
|
|
51260
|
-
|
|
51261
|
-
|
|
51262
|
-
|
|
51263
|
-
|
|
51256
|
+
switch (this.statePointer) {
|
|
51257
|
+
case "start":
|
|
51258
|
+
connector.setStartPoint(point5, this.beginTimeStamp);
|
|
51259
|
+
this.selection.subject.publish(this.selection);
|
|
51260
|
+
break;
|
|
51261
|
+
case "end":
|
|
51262
|
+
connector.setEndPoint(point5, this.beginTimeStamp);
|
|
51263
|
+
this.selection.subject.publish(this.selection);
|
|
51264
|
+
break;
|
|
51265
|
+
case "middle":
|
|
51266
|
+
connector.setMiddlePoint(point5, this.beginTimeStamp);
|
|
51267
|
+
break;
|
|
51268
|
+
}
|
|
51264
51269
|
this.selection.subject.publish(this.selection);
|
|
51265
51270
|
}
|
|
51266
51271
|
}
|
package/dist/cjs/node.js
CHANGED
|
@@ -23516,14 +23516,13 @@ class SpatialIndex {
|
|
|
23516
23516
|
return this.Mbr;
|
|
23517
23517
|
}
|
|
23518
23518
|
getNearestTo(point3, maxItems, filter, maxDistance) {
|
|
23519
|
-
const
|
|
23520
|
-
|
|
23521
|
-
|
|
23522
|
-
|
|
23523
|
-
|
|
23524
|
-
})
|
|
23525
|
-
|
|
23526
|
-
return withDistance.slice(0, maxItems).map(({ item }) => item);
|
|
23519
|
+
const nearestItems = this.itemsIndex.getNearestTo(point3, maxItems, filter, maxDistance);
|
|
23520
|
+
nearestItems.sort((aa, bb) => {
|
|
23521
|
+
const distA = point3.getDistance(aa.getMbr().getCenter());
|
|
23522
|
+
const distB = point3.getDistance(bb.getMbr().getCenter());
|
|
23523
|
+
return distA - distB;
|
|
23524
|
+
});
|
|
23525
|
+
return nearestItems.slice(0, maxItems);
|
|
23527
23526
|
}
|
|
23528
23527
|
list() {
|
|
23529
23528
|
return this.getItemsWithIncludedChildren(this.itemsArray).concat();
|
|
@@ -53727,13 +53726,19 @@ class ConnectorTransformer extends Tool {
|
|
|
53727
53726
|
this.snap.connector = connector;
|
|
53728
53727
|
this.snap.pointerMove();
|
|
53729
53728
|
const point5 = this.snap.getControlPoint();
|
|
53730
|
-
|
|
53731
|
-
start:
|
|
53732
|
-
|
|
53733
|
-
|
|
53734
|
-
|
|
53735
|
-
|
|
53736
|
-
|
|
53729
|
+
switch (this.statePointer) {
|
|
53730
|
+
case "start":
|
|
53731
|
+
connector.setStartPoint(point5, this.beginTimeStamp);
|
|
53732
|
+
this.selection.subject.publish(this.selection);
|
|
53733
|
+
break;
|
|
53734
|
+
case "end":
|
|
53735
|
+
connector.setEndPoint(point5, this.beginTimeStamp);
|
|
53736
|
+
this.selection.subject.publish(this.selection);
|
|
53737
|
+
break;
|
|
53738
|
+
case "middle":
|
|
53739
|
+
connector.setMiddlePoint(point5, this.beginTimeStamp);
|
|
53740
|
+
break;
|
|
53741
|
+
}
|
|
53737
53742
|
this.selection.subject.publish(this.selection);
|
|
53738
53743
|
}
|
|
53739
53744
|
}
|
package/dist/esm/browser.js
CHANGED
|
@@ -20890,14 +20890,13 @@ class SpatialIndex {
|
|
|
20890
20890
|
return this.Mbr;
|
|
20891
20891
|
}
|
|
20892
20892
|
getNearestTo(point3, maxItems, filter, maxDistance) {
|
|
20893
|
-
const
|
|
20894
|
-
|
|
20895
|
-
|
|
20896
|
-
|
|
20897
|
-
|
|
20898
|
-
})
|
|
20899
|
-
|
|
20900
|
-
return withDistance.slice(0, maxItems).map(({ item }) => item);
|
|
20893
|
+
const nearestItems = this.itemsIndex.getNearestTo(point3, maxItems, filter, maxDistance);
|
|
20894
|
+
nearestItems.sort((aa, bb) => {
|
|
20895
|
+
const distA = point3.getDistance(aa.getMbr().getCenter());
|
|
20896
|
+
const distB = point3.getDistance(bb.getMbr().getCenter());
|
|
20897
|
+
return distA - distB;
|
|
20898
|
+
});
|
|
20899
|
+
return nearestItems.slice(0, maxItems);
|
|
20901
20900
|
}
|
|
20902
20901
|
list() {
|
|
20903
20902
|
return this.getItemsWithIncludedChildren(this.itemsArray).concat();
|
|
@@ -51100,13 +51099,19 @@ class ConnectorTransformer extends Tool {
|
|
|
51100
51099
|
this.snap.connector = connector;
|
|
51101
51100
|
this.snap.pointerMove();
|
|
51102
51101
|
const point5 = this.snap.getControlPoint();
|
|
51103
|
-
|
|
51104
|
-
start:
|
|
51105
|
-
|
|
51106
|
-
|
|
51107
|
-
|
|
51108
|
-
|
|
51109
|
-
|
|
51102
|
+
switch (this.statePointer) {
|
|
51103
|
+
case "start":
|
|
51104
|
+
connector.setStartPoint(point5, this.beginTimeStamp);
|
|
51105
|
+
this.selection.subject.publish(this.selection);
|
|
51106
|
+
break;
|
|
51107
|
+
case "end":
|
|
51108
|
+
connector.setEndPoint(point5, this.beginTimeStamp);
|
|
51109
|
+
this.selection.subject.publish(this.selection);
|
|
51110
|
+
break;
|
|
51111
|
+
case "middle":
|
|
51112
|
+
connector.setMiddlePoint(point5, this.beginTimeStamp);
|
|
51113
|
+
break;
|
|
51114
|
+
}
|
|
51110
51115
|
this.selection.subject.publish(this.selection);
|
|
51111
51116
|
}
|
|
51112
51117
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -20883,14 +20883,13 @@ class SpatialIndex {
|
|
|
20883
20883
|
return this.Mbr;
|
|
20884
20884
|
}
|
|
20885
20885
|
getNearestTo(point3, maxItems, filter, maxDistance) {
|
|
20886
|
-
const
|
|
20887
|
-
|
|
20888
|
-
|
|
20889
|
-
|
|
20890
|
-
|
|
20891
|
-
})
|
|
20892
|
-
|
|
20893
|
-
return withDistance.slice(0, maxItems).map(({ item }) => item);
|
|
20886
|
+
const nearestItems = this.itemsIndex.getNearestTo(point3, maxItems, filter, maxDistance);
|
|
20887
|
+
nearestItems.sort((aa, bb) => {
|
|
20888
|
+
const distA = point3.getDistance(aa.getMbr().getCenter());
|
|
20889
|
+
const distB = point3.getDistance(bb.getMbr().getCenter());
|
|
20890
|
+
return distA - distB;
|
|
20891
|
+
});
|
|
20892
|
+
return nearestItems.slice(0, maxItems);
|
|
20894
20893
|
}
|
|
20895
20894
|
list() {
|
|
20896
20895
|
return this.getItemsWithIncludedChildren(this.itemsArray).concat();
|
|
@@ -51093,13 +51092,19 @@ class ConnectorTransformer extends Tool {
|
|
|
51093
51092
|
this.snap.connector = connector;
|
|
51094
51093
|
this.snap.pointerMove();
|
|
51095
51094
|
const point5 = this.snap.getControlPoint();
|
|
51096
|
-
|
|
51097
|
-
start:
|
|
51098
|
-
|
|
51099
|
-
|
|
51100
|
-
|
|
51101
|
-
|
|
51102
|
-
|
|
51095
|
+
switch (this.statePointer) {
|
|
51096
|
+
case "start":
|
|
51097
|
+
connector.setStartPoint(point5, this.beginTimeStamp);
|
|
51098
|
+
this.selection.subject.publish(this.selection);
|
|
51099
|
+
break;
|
|
51100
|
+
case "end":
|
|
51101
|
+
connector.setEndPoint(point5, this.beginTimeStamp);
|
|
51102
|
+
this.selection.subject.publish(this.selection);
|
|
51103
|
+
break;
|
|
51104
|
+
case "middle":
|
|
51105
|
+
connector.setMiddlePoint(point5, this.beginTimeStamp);
|
|
51106
|
+
break;
|
|
51107
|
+
}
|
|
51103
51108
|
this.selection.subject.publish(this.selection);
|
|
51104
51109
|
}
|
|
51105
51110
|
}
|
package/dist/esm/node.js
CHANGED
|
@@ -23350,14 +23350,13 @@ class SpatialIndex {
|
|
|
23350
23350
|
return this.Mbr;
|
|
23351
23351
|
}
|
|
23352
23352
|
getNearestTo(point3, maxItems, filter, maxDistance) {
|
|
23353
|
-
const
|
|
23354
|
-
|
|
23355
|
-
|
|
23356
|
-
|
|
23357
|
-
|
|
23358
|
-
})
|
|
23359
|
-
|
|
23360
|
-
return withDistance.slice(0, maxItems).map(({ item }) => item);
|
|
23353
|
+
const nearestItems = this.itemsIndex.getNearestTo(point3, maxItems, filter, maxDistance);
|
|
23354
|
+
nearestItems.sort((aa, bb) => {
|
|
23355
|
+
const distA = point3.getDistance(aa.getMbr().getCenter());
|
|
23356
|
+
const distB = point3.getDistance(bb.getMbr().getCenter());
|
|
23357
|
+
return distA - distB;
|
|
23358
|
+
});
|
|
23359
|
+
return nearestItems.slice(0, maxItems);
|
|
23361
23360
|
}
|
|
23362
23361
|
list() {
|
|
23363
23362
|
return this.getItemsWithIncludedChildren(this.itemsArray).concat();
|
|
@@ -53561,13 +53560,19 @@ class ConnectorTransformer extends Tool {
|
|
|
53561
53560
|
this.snap.connector = connector;
|
|
53562
53561
|
this.snap.pointerMove();
|
|
53563
53562
|
const point5 = this.snap.getControlPoint();
|
|
53564
|
-
|
|
53565
|
-
start:
|
|
53566
|
-
|
|
53567
|
-
|
|
53568
|
-
|
|
53569
|
-
|
|
53570
|
-
|
|
53563
|
+
switch (this.statePointer) {
|
|
53564
|
+
case "start":
|
|
53565
|
+
connector.setStartPoint(point5, this.beginTimeStamp);
|
|
53566
|
+
this.selection.subject.publish(this.selection);
|
|
53567
|
+
break;
|
|
53568
|
+
case "end":
|
|
53569
|
+
connector.setEndPoint(point5, this.beginTimeStamp);
|
|
53570
|
+
this.selection.subject.publish(this.selection);
|
|
53571
|
+
break;
|
|
53572
|
+
case "middle":
|
|
53573
|
+
connector.setMiddlePoint(point5, this.beginTimeStamp);
|
|
53574
|
+
break;
|
|
53575
|
+
}
|
|
53571
53576
|
this.selection.subject.publish(this.selection);
|
|
53572
53577
|
}
|
|
53573
53578
|
}
|