@@ -53,7 +53,6 @@ export class SnackBar extends SnackBarBase {
5353 button . setTitleColorForState ( color , UIControlState . Highlighted ) ;
5454 button . inkColor = getRippleColor ( options . actionTextColor ) ;
5555 } ) ;
56-
5756 }
5857
5958 if ( options . backgroundColor && Color . isValid ( options . backgroundColor ) ) {
@@ -81,12 +80,11 @@ export class SnackBar extends SnackBarBase {
8180 }
8281
8382 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 ) ;
8786 } else {
8887 SnackBar . _snackbarManager . setBottomOffset ( 0 ) ;
89-
9088 }
9189 }
9290
@@ -119,7 +117,7 @@ export class SnackBar extends SnackBarBase {
119117 this . _shown = false ;
120118 resolve ( {
121119 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
123121 } ) ;
124122 } ;
125123 }
@@ -136,7 +134,7 @@ export class SnackBar extends SnackBarBase {
136134 } else {
137135 resolve ( {
138136 action : SnackBarAction . NONE ,
139- message : 'No actionbar to dismiss' ,
137+ message : 'No actionbar to dismiss'
140138 } ) ;
141139 }
142140 } ) ;
0 commit comments