Merge master
This commit is contained in:
commit
8c0cae7a8c
3 changed files with 17 additions and 6 deletions
|
@ -213,6 +213,7 @@ export class InitUiElements {
|
|||
userLayoutParam.setData(layoutToUse.id);
|
||||
return layoutToUse;
|
||||
} catch (e) {
|
||||
|
||||
new FixedUiElement("Error: could not parse the custom layout:<br/> " + e).AttachTo("centermessage");
|
||||
throw e;
|
||||
}
|
||||
|
@ -350,8 +351,8 @@ export class InitUiElements {
|
|||
const lonDiff = bounds[0][1] - bounds[1][1]
|
||||
console.warn("Locking the bounds to ", bounds)
|
||||
bm.map.setMaxBounds(
|
||||
[[ layout.startLat - latDiff, layout.startLon - lonDiff ],
|
||||
[ layout.startLat + latDiff, layout.startLon + lonDiff ],
|
||||
[[layout.startLat - latDiff, layout.startLon - lonDiff],
|
||||
[layout.startLat + latDiff, layout.startLon + lonDiff],
|
||||
]
|
||||
);
|
||||
bm.map.setMinZoom(layout.startZoom)
|
||||
|
@ -384,7 +385,7 @@ export class InitUiElements {
|
|||
State.state.layerUpdater = updater;
|
||||
const source = new FeaturePipeline(state.filteredLayers, updater, state.layoutToUse, state.changes, state.locationControl);
|
||||
|
||||
new ShowDataLayer(source.features, State.state.leafletMap, State.state.layoutToUse);
|
||||
new ShowDataLayer(source.features, State.state.leafletMap, State.state.layoutToUse);
|
||||
|
||||
new SelectedFeatureHandler(Hash.hash, State.state.selectedElement, source);
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
import {UIEventSource} from "../UIEventSource";
|
||||
|
||||
/**
|
||||
* UIEventsource-wrapper around localStorage
|
||||
*/
|
||||
export class LocalStorageSource {
|
||||
|
||||
static Get(key: string, defaultValue: string = undefined): UIEventSource<string> {
|
||||
|
@ -8,7 +11,14 @@ export class LocalStorageSource {
|
|||
const source = new UIEventSource<string>(saved ?? defaultValue, "localstorage:"+key);
|
||||
|
||||
source.addCallback((data) => {
|
||||
localStorage.setItem(key, data);
|
||||
try{
|
||||
localStorage.setItem(key, data);
|
||||
}catch(e){
|
||||
// Probably exceeded the quota with this item!
|
||||
// Lets nuke everything
|
||||
localStorage.clear()
|
||||
}
|
||||
|
||||
});
|
||||
return source;
|
||||
} catch (e) {
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
id="layer1"
|
||||
inkscape:label="bg"
|
||||
style="display:inline"><circle
|
||||
style="fill:#f2ffff;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path815"
|
||||
cx="200"
|
||||
cy="199.4688"
|
||||
|
|
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 4 KiB |
Loading…
Reference in a new issue