mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
(added editor events)
This commit is contained in:
parent
99071ee639
commit
2e26fecf34
1 changed files with 5 additions and 2 deletions
|
@ -104,16 +104,16 @@ export class InteractivePoly extends Polyline {
|
|||
disable: () => {
|
||||
this.hideAllMarkers();
|
||||
this.is_editing = false;
|
||||
this.fire('editordisable');
|
||||
},
|
||||
enable: () => {
|
||||
this.is_editing = true;
|
||||
this.showVisibleMarkers();
|
||||
this.fire('editorenable');
|
||||
}
|
||||
};
|
||||
|
||||
onMarkerDrag = ({ target }: { target: Marker}) => {
|
||||
console.log(this.vertex_index, this.markers.length);
|
||||
|
||||
this.setConstraints(
|
||||
this.vertex_index > 0 && this.markers[this.vertex_index - 1].getLatLng(),
|
||||
target.getLatLng(),
|
||||
|
@ -211,4 +211,7 @@ InteractivePoly.addInitHook(function () {
|
|||
|
||||
allvertexhide
|
||||
allvertexshow
|
||||
|
||||
editordisable
|
||||
editorenable
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue