Skip to content

Commit 2f4f0e8

Browse files
committed
Close issue_2165
Add event handlers on the cut event
1 parent 4615898 commit 2f4f0e8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

folium/plugins/geoman.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,18 @@ class GeoMan(JSCSSMixin, MacroElement):
6464
{%- endfor %}
6565
});
6666
67+
{{ this._parent.get_name() }}.on("pm:cut", function(e) {
68+
var layer = e.layer,
69+
type = e.layerType;
70+
71+
{%- for event, handler in this.on.items() %}
72+
layer.on(
73+
"{{event}}",
74+
{{handler}}
75+
);
76+
{%- endfor %}
77+
});
78+
6779
{% endmacro %}
6880
"""
6981
)

0 commit comments

Comments
 (0)