diff --git a/src/containers/App.jsx b/src/containers/App.jsx index ae5ae21..a8d84ce 100644 --- a/src/containers/App.jsx +++ b/src/containers/App.jsx @@ -31,7 +31,17 @@ export class App extends React.Component { mapInit = () => { const path = getPath(); - if (path) getStoredMap({ name: path, callback: this.editor.setData }); + if (path) getStoredMap({ name: path, callback: this.setDataOnLoad }); + }; + + setDataOnLoad = data => { + this.editor.setData(data); + this.hideLoader(); + }; + + hideLoader = () => { + document.getElementById('loader').style.opacity = 0; + document.getElementById('loader').style.pointerEvents = 'none'; }; setMode = mode => { @@ -101,9 +111,7 @@ export class App extends React.Component { storeData('user', this.state.user); }; - getUserData = () => { - return getData('user') || null; - }; + getUserData = () => getData('user') || null; userLogout = () => { this.setState({ diff --git a/src/index.html b/src/index.html index 0db381b..067fea9 100644 --- a/src/index.html +++ b/src/index.html @@ -9,9 +9,21 @@ + - +
-
+
diff --git a/src/modules/Poly.js b/src/modules/Poly.js index a55afd3..888a79e 100644 --- a/src/modules/Poly.js +++ b/src/modules/Poly.js @@ -127,6 +127,8 @@ export class Poly { setPoints = latlngs => { if (!latlngs || latlngs.length <= 1) return; this.poly.setLatLngs(latlngs); + + this.updateMarks(); }; pushPoints = latlngs => {