Skip to content

Commit 5fc4016

Browse files
committed
slight bump in the deltaY pan check
1 parent b98a16a commit 5fc4016

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

fab-common.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@ var FloatingActionButton = (function (_super) {
4747
var duration = (this.hideAnimationDuration) ? this.hideAnimationDuration : this.getDurationDefault(animationType);
4848

4949
swipeItem.on("pan", function (args) {
50-
var delta = args.deltaY;
5150
//Swipe up
52-
if (delta < 0) {
51+
if (args.deltaY < -10) {
5352
switch(animationType){
5453
case "slideUp":
5554
fab.animate({ translate: { x: 0, y: -200 }, opacity: 0, duration: duration });
@@ -70,7 +69,7 @@ var FloatingActionButton = (function (_super) {
7069

7170
}
7271
//Swipe Down
73-
else {
72+
else if (args.deltaY > 0) {
7473
switch(animationType){
7574
case "slideUp":
7675
fab.animate({ translate: { x: 0, y: 0 }, opacity: 1, duration: duration });

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-floatingactionbutton",
3-
"version": "2.2.3",
3+
"version": "2.2.4",
44
"description": "A NativeScript plugin to provide an XML widget to implement the Material Design Floating Action Button in NativeScript apps.",
55
"main": "fab.js",
66
"nativescript": {

0 commit comments

Comments
 (0)