mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
redux: half-completed editor panel
This commit is contained in:
parent
2656a9fad8
commit
e56e49acf4
6 changed files with 67 additions and 24 deletions
|
@ -99,8 +99,9 @@ export class Editor {
|
|||
}
|
||||
|
||||
getUser = () => store.getState().user.user;
|
||||
getTitle = () => store.getState().title;
|
||||
getEditing = () => store.getState().editing;
|
||||
getTitle = () => store.getState().user.title;
|
||||
getEditing = () => store.getState().user.editing;
|
||||
getChanged = () => store.getState().user.changed;
|
||||
|
||||
setEditing = value => store.dispatch(setEditing(value));
|
||||
setDistance = value => store.dispatch(setDistance(value));
|
||||
|
@ -111,10 +112,10 @@ export class Editor {
|
|||
setTitle = value => store.dispatch(setTitle(value));
|
||||
setAddress = value => store.dispatch(setAddress(value));
|
||||
|
||||
clearChanged = () => store.direction(setChanged(false));
|
||||
clearChanged = () => store.dispatch(setChanged(false));
|
||||
|
||||
triggerOnChange = () => {
|
||||
if (!this.getEditing()) return;
|
||||
if (!this.getEditing() && this.getChanged()) return;
|
||||
|
||||
this.setChanged(true);
|
||||
};
|
||||
|
@ -277,7 +278,7 @@ export class Editor {
|
|||
if (this.poly.latlngs && this.poly.latlngs.length > 1) this.poly.poly.enableEdit();
|
||||
|
||||
this.stickers.startEditing();
|
||||
this.setEditing(true);
|
||||
// this.setEditing(true);
|
||||
|
||||
console.log(this.initialData);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue