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: () => {
|
disable: () => {
|
||||||
this.hideAllMarkers();
|
this.hideAllMarkers();
|
||||||
this.is_editing = false;
|
this.is_editing = false;
|
||||||
|
this.fire('editordisable');
|
||||||
},
|
},
|
||||||
enable: () => {
|
enable: () => {
|
||||||
this.is_editing = true;
|
this.is_editing = true;
|
||||||
this.showVisibleMarkers();
|
this.showVisibleMarkers();
|
||||||
|
this.fire('editorenable');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
onMarkerDrag = ({ target }: { target: Marker}) => {
|
onMarkerDrag = ({ target }: { target: Marker}) => {
|
||||||
console.log(this.vertex_index, this.markers.length);
|
|
||||||
|
|
||||||
this.setConstraints(
|
this.setConstraints(
|
||||||
this.vertex_index > 0 && this.markers[this.vertex_index - 1].getLatLng(),
|
this.vertex_index > 0 && this.markers[this.vertex_index - 1].getLatLng(),
|
||||||
target.getLatLng(),
|
target.getLatLng(),
|
||||||
|
@ -211,4 +211,7 @@ InteractivePoly.addInitHook(function () {
|
||||||
|
|
||||||
allvertexhide
|
allvertexhide
|
||||||
allvertexshow
|
allvertexshow
|
||||||
|
|
||||||
|
editordisable
|
||||||
|
editorenable
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue