Skip to content

Commit

Permalink
fix arc layer default arguments (#359)
Browse files Browse the repository at this point in the history
The arc layer was accidentally [rendering "flat"
lines](https://deck.gl/docs/api-reference/layers/arc-layer#getheight) by
default because we were unintentionally passing `0` as a default value.
Instead we pass in `None` to "unset" a default value
  • Loading branch information
kylebarron authored Feb 13, 2024
1 parent 696e2c7 commit f0410f8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lonboard/experimental/_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,23 +80,23 @@ class ArcLayer(BaseArrowLayer):
- Default: `None`
"""

get_source_position = PointAccessor()
get_source_position = PointAccessor(None, allow_none=True)
"""Source position of each object
"""

get_target_position = PointAccessor()
get_target_position = PointAccessor(None, allow_none=True)
"""Target position of each object
"""

get_source_color = ColorAccessor()
get_source_color = ColorAccessor(None, allow_none=True)
"""Source color of each object
"""

get_target_color = ColorAccessor()
get_target_color = ColorAccessor(None, allow_none=True)
"""Target color of each object
"""

get_width = FloatAccessor()
get_width = FloatAccessor(None, allow_none=True)
"""The line width of each object, in units specified by `widthUnits`.
- Type: [FloatAccessor][lonboard.traits.FloatAccessor], optional
Expand All @@ -106,11 +106,11 @@ class ArcLayer(BaseArrowLayer):
- Default: `1`.
"""

get_height = FloatAccessor()
get_height = FloatAccessor(None, allow_none=True)
"""Height color of each object
"""

get_tilt = FloatAccessor()
get_tilt = FloatAccessor(None, allow_none=True)
"""
Use to tilt the arc to the side if you have multiple arcs with the same source and
target positions.
Expand Down

0 comments on commit f0410f8

Please sign in to comment.