Skip to content

Commit 53a00a8

Browse files
Bugfix drag and drop
1 parent c54a2bd commit 53a00a8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

plotly/basedatatypes.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -4682,6 +4682,7 @@ def __getitem__(self, prop):
46824682
CompoundArrayValidator,
46834683
BaseDataValidator,
46844684
)
4685+
from .validators.layout._shapes import ShapesValidator
46854686

46864687
# Normalize prop
46874688
# --------------
@@ -4707,7 +4708,6 @@ def __getitem__(self, prop):
47074708
)
47084709

47094710
validator = self._get_validator(prop)
4710-
47114711
if isinstance(validator, CompoundValidator):
47124712
if self._compound_props.get(prop, None) is None:
47134713
# Init compound objects
@@ -4719,6 +4719,12 @@ def __getitem__(self, prop):
47194719
self._compound_props[prop]._plotly_name = prop
47204720

47214721
return validator.present(self._compound_props[prop])
4722+
elif isinstance(validator, ShapesValidator):
4723+
props = []
4724+
if self._props is not None and prop in self._props:
4725+
props = [validator.data_class() for _ in self._props.get(prop, [])]
4726+
4727+
return validator.present(props)
47224728
elif isinstance(validator, (CompoundArrayValidator, BaseDataValidator)):
47234729
if self._compound_array_props.get(prop, None) is None:
47244730
# Init list of compound objects

0 commit comments

Comments
 (0)