starting empty editor on map loading error

This commit is contained in:
muerwre 2018-08-29 14:58:38 +07:00
parent e3e209ff65
commit e0f5d0238a
3 changed files with 16 additions and 6 deletions

View file

@ -19,7 +19,7 @@ export class Editor {
setLogo,
}) {
this.logo = DEFAULT_LOGO;
this.owner = null;
this.map = new Map({ container });
const {
@ -166,9 +166,9 @@ export class Editor {
this.logo = logo;
this.setLogo(logo);
this.changeMode(MODES.NONE);
}
};
setData = ({ route, stickers, format = 'old' }) => {
setData = ({ route, stickers, format = 'old', owner }) => {
if (route) {
this.poly.setPoints(route);
}
@ -180,6 +180,11 @@ export class Editor {
sticker: parseStickerStyle({ style, format }),
}));
}
if (owner) {
this.owner = owner;
}
this.map.map.fitBounds(this.poly.poly.getBounds());
};