Skip to content

Commit

Permalink
easing option for slide
Browse files Browse the repository at this point in the history
  • Loading branch information
achesco committed Jul 31, 2015
1 parent 39a8cfe commit e54ffb8
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 37 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Available through `$.fn.slideprojector.defaults`. For instance to set default an

* `{Number} [basicZIndex=0]` Basic CSS z-index property value for slide items
* `{Number} [animationZIndex=1]` z-index value to set during slide animation to make new slide ontop of current one
* `{String} [easing='swing']` Animation easing equation name for jQuery.animate. `'swing'`, `'linear'` available.

#### poproll

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "slideprojector",
"version": "0.3.1",
"version": "0.3.2",
"homepage": "https://github.com/achesco/SlideProjector",
"authors": [
"Anton Lysenko <[email protected]>"
Expand Down
24 changes: 13 additions & 11 deletions dist/jquery.slideprojector.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,8 @@
getImplementationDefaults: function () {
return {
basicZIndex: 0,
animationZIndex: 1
animationZIndex: 1,
easing: 'swing'
};
},

Expand All @@ -586,16 +587,17 @@
})
.removeClass(this.options.hiddenClassName)
.animate({
left: 0
}, {
queue: false,
duration: this.options.duration,
complete: function () {
newItem.css('zIndex', this.implOptions.basicZIndex);
item.addClass(this.options.hiddenClassName);
this.inProgress = false;
}.bind(this)
});
left: '0%'
}, {
queue: false,
easing: this.implOptions.easing,
duration: this.options.duration,
complete: function () {
newItem.css('zIndex', this.implOptions.basicZIndex);
item.addClass(this.options.hiddenClassName);
this.inProgress = false;
}.bind(this)
});
}
});

Expand Down
24 changes: 13 additions & 11 deletions dist/jquery.slideprojector.slide.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
getImplementationDefaults: function () {
return {
basicZIndex: 0,
animationZIndex: 1
animationZIndex: 1,
easing: 'swing'
};
},

Expand All @@ -42,16 +43,17 @@
})
.removeClass(this.options.hiddenClassName)
.animate({
left: 0
}, {
queue: false,
duration: this.options.duration,
complete: function () {
newItem.css('zIndex', this.implOptions.basicZIndex);
item.addClass(this.options.hiddenClassName);
this.inProgress = false;
}.bind(this)
});
left: '0%'
}, {
queue: false,
easing: this.implOptions.easing,
duration: this.options.duration,
complete: function () {
newItem.css('zIndex', this.implOptions.basicZIndex);
item.addClass(this.options.hiddenClassName);
this.inProgress = false;
}.bind(this)
});
}
});

Expand Down
2 changes: 1 addition & 1 deletion dist/min/jquery.slideprojector.full.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/min/jquery.slideprojector.slide.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "slideprojector",
"version": "0.3.1",
"version": "0.3.2",
"description": "To slide the slides, in different ways",
"author": "Anton Lysenko <[email protected]>",
"repository": {
Expand Down
24 changes: 13 additions & 11 deletions src/slide.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
getImplementationDefaults: function () {
return {
basicZIndex: 0,
animationZIndex: 1
animationZIndex: 1,
easing: 'swing'
};
},

Expand All @@ -42,16 +43,17 @@
})
.removeClass(this.options.hiddenClassName)
.animate({
left: '0%'
}, {
queue: false,
duration: this.options.duration,
complete: function () {
newItem.css('zIndex', this.implOptions.basicZIndex);
item.addClass(this.options.hiddenClassName);
this.inProgress = false;
}.bind(this)
});
left: '0%'
}, {
queue: false,
easing: this.implOptions.easing,
duration: this.options.duration,
complete: function () {
newItem.css('zIndex', this.implOptions.basicZIndex);
item.addClass(this.options.hiddenClassName);
this.inProgress = false;
}.bind(this)
});
}
});

Expand Down

0 comments on commit e54ffb8

Please sign in to comment.