Skip to content

Commit

Permalink
Add height param to ipywidget
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Kuethe committed Aug 29, 2024
1 parent b446877 commit f7a514d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion maplibre/ipywidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,18 @@ def __init__(
sources: dict = None,
layers: list = None,
controls: list = None,
height: int | str = 400,
**kwargs,
) -> None:
self.calls = []
AnyWidget.__init__(self, **kwargs)
AnyWidget.__init__(self, height=height, **kwargs)
Map.__init__(self, map_options, sources, layers, controls, **kwargs)

"""
@traitlets.default("height")
def _default_height(self):
return "400px"
"""

@traitlets.validate("height")
def _validate_height(self, proposal):
Expand Down

0 comments on commit f7a514d

Please sign in to comment.