fixed triggerOnChange

This commit is contained in:
muerwre 2019-03-05 17:29:19 +07:00
parent da77f50a97
commit 74a49ae35d
2 changed files with 2 additions and 3 deletions

View file

@ -200,8 +200,6 @@ export class Editor {
}; };
triggerOnChange = (): void => { triggerOnChange = (): void => {
console.log('trigger on change', this.isEmpty, this.getIsEmpty());
if (this.isEmpty !== this.getIsEmpty()) this.setIsEmpty(this.isEmpty); if (this.isEmpty !== this.getIsEmpty()) this.setIsEmpty(this.isEmpty);
if (this.getEditing() && !this.getChanged()) this.setChanged(true); if (this.getEditing() && !this.getChanged()) this.setChanged(true);
}; };

View file

@ -55,7 +55,8 @@ export class Poly {
onVertexShow = (): void => this.editor.setMarkersShown(true); onVertexShow = (): void => this.editor.setMarkersShown(true);
updateMarks = event => { updateMarks = event => {
this.editor.setChanged(true); // this.editor.setChanged(true);
this.editor.triggerOnChange();
const { latlngs } = event; const { latlngs } = event;
this.arrows.setLatLngs(latlngs); this.arrows.setLatLngs(latlngs);