Skip to content

Commit

Permalink
UI Pack Fixes
Browse files Browse the repository at this point in the history
Fixes bug with e/p/o shorthands and Sequence Running. Closes #413.
Closes #421. Closes #435.

Closes #415. Thanks, @dabernathy89!

Closes #407.
  • Loading branch information
julianshapiro committed Feb 17, 2015
1 parent 0b701fe commit 6b22792
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "velocity",
"version": "1.2.1",
"version": "1.2.2",
"homepage": "http://velocityjs.org",
"authors": [
{ "name" : "Julian Shapiro",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "velocity-animate",
"version": "1.2.1",
"version": "1.2.2",
"description": "Accelerated JavaScript animation.",
"keywords": [
"velocity",
Expand Down
6 changes: 3 additions & 3 deletions velocity.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! VelocityJS.org (1.2.1). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */
/*! VelocityJS.org (1.2.2). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */

/*************************
Velocity jQuery Shim
Expand Down Expand Up @@ -651,7 +651,7 @@ return function (global, window, document, undefined) {
hook: null, /* Defined below. */
/* Velocity-wide animation time remapping for testing purposes. */
mock: false,
version: { major: 1, minor: 2, patch: 1 },
version: { major: 1, minor: 2, patch: 2 },
/* Set to 1 or 2 (most verbose) to output debug info to console. */
debug: false
};
Expand Down Expand Up @@ -3695,7 +3695,7 @@ return function (global, window, document, undefined) {
Option: Loop (Infinite)
****************************/

if (opts.loop === true && !isStopped) {
if (Data(element) && opts.loop === true && !isStopped) {
/* If a rotateX/Y/Z property is being animated to 360 deg with loop:true, swap tween start/end values to enable
continuous iterative rotation looping. (Otherise, the element would just rotate back and forth.) */
$.each(Data(element).tweensContainer, function(propertyName, tweenContainer) {
Expand Down
4 changes: 2 additions & 2 deletions velocity.min.js

Large diffs are not rendered by default.

17 changes: 11 additions & 6 deletions velocity.ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Velocity UI Pack
**********************/

/* VelocityJS.org UI Pack (5.0.3). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License. Portions copyright Daniel Eden, Christian Pucci. */
/* VelocityJS.org UI Pack (5.0.4). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License. Portions copyright Daniel Eden, Christian Pucci. */

;(function (factory) {
/* CommonJS module. */
Expand Down Expand Up @@ -641,7 +641,8 @@ return function (global, window, document, undefined) {
defaultDuration: 800,
calls: [
[ { opacity: [ 1, 0 ], transformPerspective: [ 800, 800 ], transformOriginX: [ 0, 0 ], transformOriginY: [ "100%", "100%" ], rotateX: [ 0, -180 ] } ]
]
],
reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%" }
},
/* Magic.css */
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
Expand Down Expand Up @@ -729,22 +730,26 @@ return function (global, window, document, undefined) {
/* Parallel sequence calls (indicated via sequenceQueue:false) are triggered
in the previous call's begin callback. Otherwise, chained calls are normally triggered
in the previous call's complete callback. */
var currentCallOptions = currentCall.options || currentCall.o,
nextCallOptions = nextCall.options || nextCall.o;
var currentCallOptions = currentCall.o || currentCall.options,
nextCallOptions = nextCall.o || nextCall.options;

var timing = (currentCallOptions && currentCallOptions.sequenceQueue === false) ? "begin" : "complete",
callbackOriginal = nextCallOptions && nextCallOptions[timing],
options = {};

options[timing] = function() {
var nextCallElements = nextCall.elements || nextCall.e;
var nextCallElements = nextCall.e || nextCall.elements;
var elements = nextCallElements.nodeType ? [ nextCallElements ] : nextCallElements;

callbackOriginal && callbackOriginal.call(elements, elements);
Velocity(currentCall);
}

nextCall.options = $.extend({}, nextCall.options, options);
if (nextCall.o) {
nextCall.o = $.extend({}, nextCallOptions, options);
} else {
nextCall.options = $.extend({}, nextCallOptions, options);
}
}
});

Expand Down
4 changes: 2 additions & 2 deletions velocity.ui.min.js

Large diffs are not rendered by default.

0 comments on commit 6b22792

Please sign in to comment.