mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
map_list: initial
urls: editing now handled through urls
This commit is contained in:
parent
3771e5d338
commit
0d9bad9095
23 changed files with 386 additions and 68 deletions
|
@ -218,7 +218,6 @@ export class Editor {
|
|||
this.stickers.clearAll();
|
||||
};
|
||||
|
||||
|
||||
setData = ({
|
||||
route, stickers, version = 1, owner, title, address
|
||||
}) => {
|
||||
|
@ -272,19 +271,21 @@ export class Editor {
|
|||
|
||||
this.setInitialData();
|
||||
|
||||
const url = (this.owner && this.owner.id === id) ? path : random_url;
|
||||
// const url = (this.owner && this.owner.id === id) ? path : random_url;
|
||||
this.owner = { id };
|
||||
|
||||
pushPath(`/${url}/edit`);
|
||||
// console.log('PATH IS', path);
|
||||
// pushPath(`/${url}/edit`);
|
||||
|
||||
if (this.poly.latlngs && this.poly.latlngs.length > 1) this.poly.poly.enableEdit();
|
||||
|
||||
this.stickers.startEditing();
|
||||
};
|
||||
|
||||
stopEditing = () => {
|
||||
const { path } = getUrlData();
|
||||
// const { path } = getUrlData();
|
||||
|
||||
pushPath(`/${(this.initialData && this.initialData.path) || path}`);
|
||||
// console.log('PATH IS', path, this.initialData.path);
|
||||
// pushPath(`/${(this.initialData && this.initialData.path) || path}`);
|
||||
|
||||
this.poly.poly.disableEdit();
|
||||
this.stickers.stopEditing();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue