@abi-software/flatmapvuer 0.3.13-beta-2 → 0.3.13-beta-3
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/flatmapvuer.common.js +55 -54
- package/dist/flatmapvuer.common.js.map +1 -1
- package/dist/flatmapvuer.css +1 -1
- package/dist/flatmapvuer.umd.js +55 -54
- package/dist/flatmapvuer.umd.js.map +1 -1
- package/dist/flatmapvuer.umd.min.js +1 -1
- package/dist/flatmapvuer.umd.min.js.map +1 -1
- package/package-lock.json +1 -1
- package/package.json +1 -1
- package/src/components/FlatmapVuer.vue +3 -5
- package/src/components/MultiFlatmapVuer.vue +5 -2
package/package-lock.json
CHANGED
package/package.json
CHANGED
|
@@ -702,11 +702,9 @@ export default {
|
|
|
702
702
|
}
|
|
703
703
|
});
|
|
704
704
|
} else if (state) {
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
this.restoreMapState(this._stateToBeSet);
|
|
709
|
-
}
|
|
705
|
+
this._stateToBeSet = { viewport: state.viewport, searchTerm: state.searchTerm };
|
|
706
|
+
if (this.mapImp && !this.loading)
|
|
707
|
+
this.restoreMapState(this._stateToBeSet);
|
|
710
708
|
}
|
|
711
709
|
},
|
|
712
710
|
showMinimap: function(flag) {
|
|
@@ -86,6 +86,8 @@ export default {
|
|
|
86
86
|
FlatmapVuer
|
|
87
87
|
},
|
|
88
88
|
beforeMount() {
|
|
89
|
+
//List for resolving the promise in initialise
|
|
90
|
+
//if initialise is called multiple times
|
|
89
91
|
this._resolveList = [];
|
|
90
92
|
this._initialised = false;
|
|
91
93
|
},
|
|
@@ -104,7 +106,6 @@ export default {
|
|
|
104
106
|
fetch(this.flatmapAPI)
|
|
105
107
|
.then(response => response.json())
|
|
106
108
|
.then(data => {
|
|
107
|
-
this._initialised = true;
|
|
108
109
|
//Check each key in the provided availableSpecies against the one
|
|
109
110
|
//on the server, add them to the Select if the key is found
|
|
110
111
|
Object.keys(this.availableSpecies).forEach(key => {
|
|
@@ -141,14 +142,16 @@ export default {
|
|
|
141
142
|
}
|
|
142
143
|
this.setSpecies(this.activeSpecies, this.state ? this.state.state : undefined, 5);
|
|
143
144
|
}
|
|
145
|
+
this._initialised = true;
|
|
144
146
|
resolve();
|
|
147
|
+
//Resolve all other promises resolve in the list
|
|
145
148
|
this._resolveList.forEach(other => { other(); });
|
|
146
149
|
});
|
|
147
150
|
} else if (this._initialised) {
|
|
148
151
|
//resolve as it has been initialised
|
|
149
152
|
resolve();
|
|
150
153
|
} else {
|
|
151
|
-
//resolve when the
|
|
154
|
+
//resolve when the async initialisation is finished
|
|
152
155
|
this._resolveList.push(resolve);
|
|
153
156
|
}
|
|
154
157
|
})
|