@dra2020/baseclient 1.0.114 → 1.0.116
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 +15 -6
- package/dist/baseclient.js.map +1 -1
- package/lib/geo/geo.ts +7 -3
- package/lib/ot-js/otclientengine.ts +7 -3
- package/package.json +1 -1
package/lib/geo/geo.ts
CHANGED
|
@@ -511,22 +511,26 @@ export class GeoMultiCollection
|
|
|
511
511
|
{
|
|
512
512
|
// optimise case where one entry
|
|
513
513
|
let n = this.nEntries;
|
|
514
|
+
let e = this.nthEntry(0);
|
|
514
515
|
if (n == 1)
|
|
515
516
|
{
|
|
516
|
-
let e = this.nthEntry(0);
|
|
517
517
|
this.all.topo = this._topo(e);
|
|
518
518
|
this.all.col = this.all.col || e.col;
|
|
519
519
|
this.all.map = this.all.map || e.map;
|
|
520
520
|
}
|
|
521
|
-
else
|
|
521
|
+
else if (e.topo)
|
|
522
522
|
{
|
|
523
523
|
// Old-style, goes through map (to filter hidden) and then collection
|
|
524
524
|
// this.all.topo = geoCollectionToTopoNonNull(this.allCol());
|
|
525
525
|
// New style, use splice on packed topologies
|
|
526
|
+
let filterout = Util.isEmpty(this.hidden) ? null : this.hidden; // splice function requires NULL for empty
|
|
526
527
|
let topoarray = Object.values(this.entries).filter((e: GeoEntry) => this._length(e) > 0)
|
|
527
|
-
.map((e: GeoEntry) => { return { topology: this._topo(e), filterout
|
|
528
|
+
.map((e: GeoEntry) => { return { topology: this._topo(e), filterout } });
|
|
528
529
|
this.all.topo = topoarray.length == 0 ? null : topoarray.length == 1 ? topoarray[0].topology : Poly.topoSplice(topoarray);
|
|
529
530
|
}
|
|
531
|
+
else
|
|
532
|
+
// Old-style, goes through map (to filter hidden) and then collection
|
|
533
|
+
this.all.topo = geoCollectionToTopoNonNull(this.allCol());
|
|
530
534
|
}
|
|
531
535
|
return this.all.topo;
|
|
532
536
|
}
|
|
@@ -94,8 +94,9 @@ export class OTClientEngine extends OTE.OTEngine
|
|
|
94
94
|
if (b != this.bReadOnly)
|
|
95
95
|
{
|
|
96
96
|
this.bReadOnly = b;
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
//No longer necessary - especially since we want to allow local edits to be applied for temporary work.
|
|
98
|
+
//if (this.bReadOnly)
|
|
99
|
+
// this.failbackToServerState();
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
102
|
|
|
@@ -307,7 +308,10 @@ export class OTClientEngine extends OTE.OTEngine
|
|
|
307
308
|
//
|
|
308
309
|
addLocalEdit(orig: OTC.OTCompositeResource): void
|
|
309
310
|
{
|
|
310
|
-
|
|
311
|
+
//Comment out bReadOnly test to now allow changes to be locally applied for readonly sessions, for playing around.
|
|
312
|
+
//Server still prevents any edits from actually being applied. And clientsession changes
|
|
313
|
+
//Don't actually send edits as well.
|
|
314
|
+
//if (! this.bReadOnly)
|
|
311
315
|
{
|
|
312
316
|
try
|
|
313
317
|
{
|