@@ -4682,6 +4682,7 @@ def __getitem__(self, prop):
4682
4682
CompoundArrayValidator ,
4683
4683
BaseDataValidator ,
4684
4684
)
4685
+ from .validators .layout ._shapes import ShapesValidator
4685
4686
4686
4687
# Normalize prop
4687
4688
# --------------
@@ -4707,7 +4708,6 @@ def __getitem__(self, prop):
4707
4708
)
4708
4709
4709
4710
validator = self ._get_validator (prop )
4710
-
4711
4711
if isinstance (validator , CompoundValidator ):
4712
4712
if self ._compound_props .get (prop , None ) is None :
4713
4713
# Init compound objects
@@ -4719,8 +4719,14 @@ def __getitem__(self, prop):
4719
4719
self ._compound_props [prop ]._plotly_name = prop
4720
4720
4721
4721
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 )
4722
4728
elif isinstance (validator , (CompoundArrayValidator , BaseDataValidator )):
4723
- if self ._compound_array_props .get (prop , None ) is None :
4729
+ if not self ._compound_array_props .get (prop , None ):
4724
4730
# Init list of compound objects
4725
4731
if self ._props is not None :
4726
4732
self ._compound_array_props [prop ] = [
0 commit comments