@@ -53,7 +53,6 @@ export class SnackBar extends SnackBarBase {
53
53
button . setTitleColorForState ( color , UIControlState . Highlighted ) ;
54
54
button . inkColor = getRippleColor ( options . actionTextColor ) ;
55
55
} ) ;
56
-
57
56
}
58
57
59
58
if ( options . backgroundColor && Color . isValid ( options . backgroundColor ) ) {
@@ -81,12 +80,11 @@ export class SnackBar extends SnackBarBase {
81
80
}
82
81
83
82
if ( options . anchorView ) {
84
- const totalHeight = nAttachedView ? ( nAttachedView . frame . origin . y + nAttachedView . frame . size . height ) : UIApplication . sharedApplication . keyWindow . rootViewController . view . bounds . size . height ;
85
- const result = ( options . anchorView . nativeViewProtected as UIView ) . convertPointToView ( CGPointZero , nAttachedView ) ;
86
- SnackBar . _snackbarManager . setBottomOffset ( totalHeight - result . y ) ;
83
+ const totalHeight = nAttachedView ? nAttachedView . frame . origin . y + nAttachedView . frame . size . height : UIApplication . sharedApplication . keyWindow . rootViewController . view . bounds . size . height ;
84
+ const result = ( options . anchorView . nativeViewProtected as UIView ) . convertPointToView ( CGPointZero , nAttachedView ) ;
85
+ SnackBar . _snackbarManager . setBottomOffset ( totalHeight - result . y ) ;
87
86
} else {
88
87
SnackBar . _snackbarManager . setBottomOffset ( 0 ) ;
89
-
90
88
}
91
89
}
92
90
@@ -119,7 +117,7 @@ export class SnackBar extends SnackBarBase {
119
117
this . _shown = false ;
120
118
resolve ( {
121
119
action : SnackBarAction . DISMISS ,
122
- reason : this . _dismissReason !== undefined ? this . _dismissReason : userInitiated ? DismissReasons . ACTION : DismissReasons . TIMEOUT ,
120
+ reason : this . _dismissReason !== undefined ? this . _dismissReason : userInitiated ? DismissReasons . ACTION : DismissReasons . TIMEOUT
123
121
} ) ;
124
122
} ;
125
123
}
@@ -136,7 +134,7 @@ export class SnackBar extends SnackBarBase {
136
134
} else {
137
135
resolve ( {
138
136
action : SnackBarAction . NONE ,
139
- message : 'No actionbar to dismiss' ,
137
+ message : 'No actionbar to dismiss'
140
138
} ) ;
141
139
}
142
140
} ) ;
0 commit comments