File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -80,8 +80,17 @@ export function install(overrideNGestures = false) {
8080 PageLayout = com . nativescript . gesturehandler . PageLayout ;
8181 }
8282 const layout = new PageLayout ( this . _context , ROOT_GESTURE_HANDLER_TAG ) ;
83- layout . addRow ( new org . nativescript . widgets . ItemSpec ( 1 , org . nativescript . widgets . GridUnitType . auto ) ) ;
84- layout . addRow ( new org . nativescript . widgets . ItemSpec ( 1 , org . nativescript . widgets . GridUnitType . star ) ) ;
83+ if ( layout . addRowsFromJSON ) {
84+ layout . addRowsFromJSON (
85+ JSON . stringify ( [
86+ { value : 1 , type : 0 /* org.nativescript.widgets.GridUnitType.auto */ } ,
87+ { value : 1 , type : 2 /* org.nativescript.widgets.GridUnitType.star */ } ,
88+ ] )
89+ ) ;
90+ } else {
91+ layout . addRow ( new org . nativescript . widgets . ItemSpec ( 1 , org . nativescript . widgets . GridUnitType . auto ) ) ;
92+ layout . addRow ( new org . nativescript . widgets . ItemSpec ( 1 , org . nativescript . widgets . GridUnitType . star ) ) ;
93+ }
8594
8695 // this.gestureRegistry = layout.registry();
8796 return layout ;
You can’t perform that action at this time.
0 commit comments