File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 6
6
*************************************************************************************/
7
7
import { Color } from 'tns-core-modules/color' ;
8
8
import { Property , View } from 'tns-core-modules/ui/core/view' ;
9
- import { topmost } from 'tns-core-modules/ui/frame' ;
10
9
import { PanGestureEventData } from 'tns-core-modules/ui/gestures' ;
11
10
import * as definitions from './index' ;
12
11
@@ -23,13 +22,20 @@ export class FloatingActionButtonBase extends View implements definitions.Fab {
23
22
public rippleColor : Color ;
24
23
public icon : string ;
25
24
26
- onLa ;
27
25
onLoaded ( ) {
28
26
super . onLoaded ( ) ;
27
+
29
28
if ( this . swipeEventAttached === false ) {
30
29
const fab = this ;
31
30
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
+
33
39
const animationType = this . swipeAnimation
34
40
? this . swipeAnimation
35
41
: 'slideDown' ;
Original file line number Diff line number Diff line change 1
1
// default elements
2
2
android {
3
- productFlavors {
4
- " nativescriptfloatingactionbutton" {
5
- dimension " nativescriptfloatingactionbutton"
6
- }
7
- }
3
+
8
4
}
9
5
10
6
allprojects {
You can’t perform that action at this time.
0 commit comments