@@ -78,8 +78,9 @@ export class SpeedDialItemButton extends Button {
78
78
constructor ( ) {
79
79
super ( ) ;
80
80
this . verticalAlignment = 'middle' ;
81
- this . style [ 'css:font-size' ] = 26 ;
81
+ this . style [ 'css:font-size' ] = 24 ;
82
82
this . style [ 'css:elevation' ] = 6 ;
83
+ this . style [ 'css:padding' ] = 2 ;
83
84
// this.style['css:dynamic-elevation-offset'] = 6;
84
85
}
85
86
getDefaultElevation ( ) : number {
@@ -127,6 +128,10 @@ export class SpeedDialItem extends SpeedDialItemBase {
127
128
this . addChild ( this . titleView ) ;
128
129
this . addChild ( this . button ) ;
129
130
}
131
+ updateAlignment ( ) {
132
+ ( this as any ) . columns = this . fabColumns ;
133
+ this . button . col = this . fabButtonCol ;
134
+ }
130
135
initNativeView ( ) {
131
136
super . initNativeView ( ) ;
132
137
this . titleView . on ( 'tap' , this . onButtonTap , this ) ;
@@ -226,12 +231,10 @@ export class SpeedDialItem extends SpeedDialItemBase {
226
231
227
232
//@ts -ignore
228
233
get backgroundImage ( ) {
229
- return this . button && this . button . backgroundImage ;
234
+ return this . button . backgroundImage ;
230
235
}
231
236
set backgroundImage ( value : string | LinearGradient ) {
232
- if ( this . button ) {
233
- this . button . backgroundImage = value ;
234
- }
237
+ this . button . backgroundImage = value ;
235
238
}
236
239
//@ts -ignore
237
240
get color ( ) {
@@ -266,7 +269,6 @@ export class SpeedDial extends SpeedDialItemBase {
266
269
private _fabsHolder : FlexboxLayout ;
267
270
rows : string ;
268
271
columns : string ;
269
- rPosition = 'left' ;
270
272
orientation = 'vertical' ;
271
273
isActive = false ;
272
274
actualActive = false ;
@@ -281,7 +283,7 @@ export class SpeedDial extends SpeedDialItemBase {
281
283
this . style [ 'css:padding-right' ] = 8 ;
282
284
this . _fabsHolder = new FlexboxLayout ( ) ;
283
285
this . _fabsHolder . row = 2 ;
284
- this . _fabsHolder . horizontalAlignment = this . rPosition as HorizontalAlignment ;
286
+ this . _fabsHolder . horizontalAlignment = this . horizontalAlignment ;
285
287
this . isPassThroughParentEnabled = true ;
286
288
if ( global . isIOS ) {
287
289
this . _fabsHolder . isPassThroughParentEnabled = true ;
@@ -358,10 +360,10 @@ export class SpeedDial extends SpeedDialItemBase {
358
360
// }
359
361
// }
360
362
get isLeft ( ) {
361
- return this . rPosition === 'left' ;
363
+ return this . horizontalAlignment === 'left' ;
362
364
}
363
365
get isRight ( ) {
364
- return this . rPosition === 'right' ;
366
+ return this . horizontalAlignment === 'right' ;
365
367
}
366
368
onButtonTap ( args ) {
367
369
this . active = ! this . active ;
@@ -517,6 +519,7 @@ export class SpeedDial extends SpeedDialItemBase {
517
519
}
518
520
set icon ( value : string | ImageSource ) {
519
521
this . _fabMainButton . icon = value ;
522
+ this . _fabMainButton . padding = 0 ;
520
523
}
521
524
get buttonClass ( ) {
522
525
return this . _fabMainButton . buttonClass ;
@@ -556,6 +559,13 @@ export class SpeedDial extends SpeedDialItemBase {
556
559
}
557
560
set horizontalAlignment ( value ) {
558
561
this . _fabsHolder . horizontalAlignment = value ;
562
+ this . _fabMainButton . updateAlignment ( ) ;
563
+ this . _fabsHolder . eachChild ( ( c ) => {
564
+ if ( c instanceof SpeedDialItem ) {
565
+ c . updateAlignment ( ) ;
566
+ }
567
+ return true ;
568
+ } ) ;
559
569
}
560
570
//@ts -ignore
561
571
// get backgroundColor() {
0 commit comments