nativescript-effects
Advanced tools
Comparing version 0.2.1 to 0.2.2
{ | ||
"name": "nativescript-effects", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"main": "tns-effects.js", | ||
@@ -5,0 +5,0 @@ "description": "A NativeScript plugin that extend animations to include common animation scenarios.", |
@@ -69,6 +69,6 @@ //nativescript-effects | ||
if (this.opacity > 0) { | ||
this.fadeOut(duration); | ||
return this.fadeOut(duration); | ||
} | ||
else { | ||
this.fadeIn(duration); | ||
return this.fadeIn(duration); | ||
} | ||
@@ -128,12 +128,15 @@ }; | ||
//.hide( options ) | ||
viewModule.View.prototype.hide = function(duration = 1) { | ||
this.fadeOut(duration); | ||
viewModule.View.prototype.hide = function(duration) { | ||
if (duration === void 0) { duration = 1; } | ||
return this.fadeOut(duration); | ||
}; | ||
viewModule.View.prototype.show = function(duration = 1) { | ||
this.fadeIn(duration); | ||
viewModule.View.prototype.show = function(duration) { | ||
if (duration === void 0) { duration = 1; } | ||
return this.fadeIn(duration); | ||
}; | ||
viewModule.View.prototype.toggle = function(duration = 1) { | ||
this.fadeToggle(duration); | ||
viewModule.View.prototype.toggle = function(duration) { | ||
if (duration === void 0) { duration = 1; } | ||
return this.fadeToggle(duration); | ||
}; | ||
@@ -185,6 +188,6 @@ | ||
if (this.opacity > 0) { | ||
this.slideUp(duration, distance); | ||
return this.slideUp(duration, distance); | ||
} | ||
else { | ||
this.slideDown(duration, distance); | ||
return this.slideDown(duration, distance); | ||
} | ||
@@ -191,0 +194,0 @@ }; |
20419
329