Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Bugfix drag and drop
  • Loading branch information
itepifanio authored and itepifanio-shape committed Mar 3, 2025
commit 1741b5b67d16997bd751c337184deac5cab2ebae
8 changes: 7 additions & 1 deletion plotly/basedatatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4682,6 +4682,7 @@ def __getitem__(self, prop):
CompoundArrayValidator,
BaseDataValidator,
)
from .validators.layout._shapes import ShapesValidator

# Normalize prop
# --------------
Expand All @@ -4707,7 +4708,6 @@ def __getitem__(self, prop):
)

validator = self._get_validator(prop)

if isinstance(validator, CompoundValidator):
if self._compound_props.get(prop, None) is None:
# Init compound objects
Expand All @@ -4719,6 +4719,12 @@ def __getitem__(self, prop):
self._compound_props[prop]._plotly_name = prop

return validator.present(self._compound_props[prop])
elif isinstance(validator, ShapesValidator):
props = []
if self._props is not None and prop in self._props:
props = [validator.data_class() for _ in self._props.get(prop, [])]

return validator.present(props)
elif isinstance(validator, (CompoundArrayValidator, BaseDataValidator)):
if self._compound_array_props.get(prop, None) is None:
# Init list of compound objects
Expand Down