File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 *************************************************************************************/
77import { Color } from 'tns-core-modules/color' ;
88import { Property , View } from 'tns-core-modules/ui/core/view' ;
9- import { topmost } from 'tns-core-modules/ui/frame' ;
109import { PanGestureEventData } from 'tns-core-modules/ui/gestures' ;
1110import * as definitions from './index' ;
1211
@@ -23,13 +22,20 @@ export class FloatingActionButtonBase extends View implements definitions.Fab {
2322 public rippleColor : Color ;
2423 public icon : string ;
2524
26- onLa ;
2725 onLoaded ( ) {
2826 super . onLoaded ( ) ;
27+
2928 if ( this . swipeEventAttached === false ) {
3029 const fab = this ;
3130 if ( this . hideOnSwipeOfView ) {
32- const swipeItem = topmost ( ) . getViewById ( this . hideOnSwipeOfView ) ;
31+ const parent = this . parent || this . parentNode ;
32+ const swipeItem = parent . getViewById ( this . hideOnSwipeOfView ) ;
33+
34+ // check if we have the UI to attach animation to
35+ if ( ! swipeItem ) {
36+ return ;
37+ }
38+
3339 const animationType = this . swipeAnimation
3440 ? this . swipeAnimation
3541 : 'slideDown' ;
Original file line number Diff line number Diff line change 11// default elements
22android {
3- productFlavors {
4- " nativescriptfloatingactionbutton" {
5- dimension " nativescriptfloatingactionbutton"
6- }
7- }
3+
84}
95
106allprojects {
You can’t perform that action at this time.
0 commit comments