@dra2020/baseclient 1.0.113 → 1.0.115
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/baseclient.js +12 -3
- package/dist/baseclient.js.map +1 -1
- package/dist/geo/geo.d.ts +1 -0
- package/lib/geo/geo.ts +14 -3
- package/package.json +1 -1
package/dist/baseclient.js
CHANGED
|
@@ -2727,6 +2727,11 @@ class GeoMultiCollection {
|
|
|
2727
2727
|
return this.all.map;
|
|
2728
2728
|
}
|
|
2729
2729
|
allTopo() {
|
|
2730
|
+
// Note that you can't actually switch between allNewTopo and allOldTopo
|
|
2731
|
+
// without calling _onChange between the calls to reset the 'all' tag.
|
|
2732
|
+
return this.allNewTopo();
|
|
2733
|
+
}
|
|
2734
|
+
allOldTopo() {
|
|
2730
2735
|
if (this.nEntries == 0)
|
|
2731
2736
|
return null;
|
|
2732
2737
|
if (!this.all.topo) {
|
|
@@ -2751,20 +2756,24 @@ class GeoMultiCollection {
|
|
|
2751
2756
|
if (!this.all.topo) {
|
|
2752
2757
|
// optimise case where one entry
|
|
2753
2758
|
let n = this.nEntries;
|
|
2759
|
+
let e = this.nthEntry(0);
|
|
2754
2760
|
if (n == 1) {
|
|
2755
|
-
let e = this.nthEntry(0);
|
|
2756
2761
|
this.all.topo = this._topo(e);
|
|
2757
2762
|
this.all.col = this.all.col || e.col;
|
|
2758
2763
|
this.all.map = this.all.map || e.map;
|
|
2759
2764
|
}
|
|
2760
|
-
else {
|
|
2765
|
+
else if (e.topo) {
|
|
2761
2766
|
// Old-style, goes through map (to filter hidden) and then collection
|
|
2762
2767
|
// this.all.topo = geoCollectionToTopoNonNull(this.allCol());
|
|
2763
2768
|
// New style, use splice on packed topologies
|
|
2769
|
+
let filterout = Util.isEmpty(this.hidden) ? null : this.hidden; // splice function requires NULL for empty
|
|
2764
2770
|
let topoarray = Object.values(this.entries).filter((e) => this._length(e) > 0)
|
|
2765
|
-
.map((e) => { return { topology: this._topo(e), filterout
|
|
2771
|
+
.map((e) => { return { topology: this._topo(e), filterout }; });
|
|
2766
2772
|
this.all.topo = topoarray.length == 0 ? null : topoarray.length == 1 ? topoarray[0].topology : Poly.topoSplice(topoarray);
|
|
2767
2773
|
}
|
|
2774
|
+
else
|
|
2775
|
+
// Old-style, goes through map (to filter hidden) and then collection
|
|
2776
|
+
this.all.topo = geoCollectionToTopoNonNull(this.allCol());
|
|
2768
2777
|
}
|
|
2769
2778
|
return this.all.topo;
|
|
2770
2779
|
}
|