@@ -210,13 +210,10 @@ pub(crate) fn property_from_type(
210210 Some ( x) if x == TypeId :: of :: < String > ( ) => text_widget ( default_info) . into ( ) ,
211211 Some ( x) if x == TypeId :: of :: < DVec2 > ( ) => vec2_widget ( default_info, "X" , "Y" , "" , None , false ) ,
212212 Some ( x) if x == TypeId :: of :: < DAffine2 > ( ) => transform_widget ( default_info, & mut extra_widgets) ,
213- // ==========================
214- // PRIMITIVE COLLECTION TYPES
215- // ==========================
216- Some ( x) if x == TypeId :: of :: < Vec < f64 > > ( ) => array_of_number_widget ( default_info, TextInput :: default ( ) ) . into ( ) ,
217213 // ===========
218214 // TABLE TYPES
219215 // ===========
216+ Some ( x) if x == TypeId :: of :: < Table < f64 > > ( ) => array_of_number_widget ( default_info, TextInput :: default ( ) ) . into ( ) ,
220217 Some ( x) if x == TypeId :: of :: < Table < Color > > ( ) => color_widget ( default_info, ColorInput :: default ( ) . allow_none ( true ) ) ,
221218 Some ( x) if x == TypeId :: of :: < Table < GradientStops > > ( ) => color_widget ( default_info, ColorInput :: default ( ) . allow_none ( false ) ) ,
222219 // ============
@@ -775,19 +772,19 @@ pub fn array_of_number_widget(parameter_widgets_info: ParameterWidgetsInfo, text
775772 . map ( str:: parse :: < f64 > )
776773 . collect :: < Result < Vec < _ > , _ > > ( )
777774 . ok ( )
778- . map ( TaggedValue :: VecF64 )
775+ . map ( |values| TaggedValue :: F64Table ( values . into_iter ( ) . map ( graphene_std :: table :: TableRow :: new_from_element ) . collect ( ) ) )
779776 } ;
780777
781778 let Some ( document_node) = document_node else { return Vec :: new ( ) } ;
782779 let Some ( input) = document_node. inputs . get ( index) else {
783780 log:: warn!( "A widget failed to be built because its node's input index is invalid." ) ;
784781 return vec ! [ ] ;
785782 } ;
786- if let Some ( TaggedValue :: VecF64 ( x ) ) = & input. as_non_exposed_value ( ) {
783+ if let Some ( TaggedValue :: F64Table ( table ) ) = & input. as_non_exposed_value ( ) {
787784 widgets. extend_from_slice ( & [
788785 Separator :: new ( SeparatorStyle :: Unrelated ) . widget_instance ( ) ,
789786 text_input
790- . value ( x . iter ( ) . map ( |v| v. to_string ( ) ) . collect :: < Vec < _ > > ( ) . join ( ", " ) )
787+ . value ( table . iter_element_values ( ) . map ( |v| v. to_string ( ) ) . collect :: < Vec < _ > > ( ) . join ( ", " ) )
791788 . on_update ( optionally_update_value ( move |x : & TextInput | from_string ( & x. value ) , node_id, index) )
792789 . widget_instance ( ) ,
793790 ] )
@@ -2263,11 +2260,10 @@ pub fn stroke_properties(node_id: NodeId, context: &mut NodePropertiesContext) -
22632260 _ => & StrokeJoin :: Miter ,
22642261 } ;
22652262
2266- let dash_lengths_val = match & document_node. inputs [ DashLengthsInput :: < Vec < f64 > > :: INDEX ] . as_value ( ) {
2267- Some ( TaggedValue :: VecF64 ( x ) ) => x ,
2268- _ => & vec ! [ ] ,
2263+ let has_dash_lengths = match & document_node. inputs [ DashLengthsInput :: < Table < f64 > > :: INDEX ] . as_value ( ) {
2264+ Some ( TaggedValue :: F64Table ( table ) ) => table . is_empty ( ) ,
2265+ _ => true ,
22692266 } ;
2270- let has_dash_lengths = dash_lengths_val. is_empty ( ) ;
22712267 let miter_limit_disabled = join_value != & StrokeJoin :: Miter ;
22722268
22732269 let color = color_widget (
@@ -2292,7 +2288,7 @@ pub fn stroke_properties(node_id: NodeId, context: &mut NodePropertiesContext) -
22922288 . property_row ( ) ;
22932289 let disabled_number_input = NumberInput :: default ( ) . unit ( " px" ) . disabled ( has_dash_lengths) ;
22942290 let dash_lengths = array_of_number_widget (
2295- ParameterWidgetsInfo :: new ( node_id, DashLengthsInput :: < Vec < f64 > > :: INDEX , true , context) ,
2291+ ParameterWidgetsInfo :: new ( node_id, DashLengthsInput :: < Table < f64 > > :: INDEX , true , context) ,
22962292 TextInput :: default ( ) . centered ( true ) ,
22972293 ) ;
22982294 let number_input = disabled_number_input;
0 commit comments