Skip to content

Commit

Permalink
Make Leaflet-Geoman ignore created layers by default, fixes jupyter-w…
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardoporreca committed Jul 22, 2024
1 parent f635a68 commit f36d97b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/ipyleaflet/ipyleaflet/leaflet.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ class Layer(Widget, InteractMixin):
Interactive widget that will be shown in a Popup when clicking on the layer.
pane: string
Name of the pane to use for the layer.
pm_ignore: boolean
Make Leaflet-Geoman ignore the layer, so it cannot modify it.
"""

_view_name = Unicode("LeafletLayerView").tag(sync=True)
Expand All @@ -195,6 +197,8 @@ class Layer(Widget, InteractMixin):
options = List(trait=Unicode()).tag(sync=True)
subitems = Tuple().tag(trait=Instance(Widget), sync=True, **widget_serialization)

pm_ignore = Bool(True).tag(sync=True, o=True)

@validate("subitems")
def _validate_subitems(self, proposal):
"""Validate subitems list.
Expand Down

0 comments on commit f36d97b

Please sign in to comment.