Commit ed73eace by Thimo Kraemer

Fixed bug introduced with camel-cased parameter conversion

parent 7c1e7be7
......@@ -2962,7 +2962,7 @@ kss._loadAnimationLib = function () {
options.queue = false;
kss.each(options.axis, function(axis) {
options.axis = axis;
options.offset = params['offset-'+axis] || params.offset || 0;
options.offset = params['offset'+axis.toUpperCase()] || params.offset || 0;
if (options.container) {
// Fix offset because of the following bug:
// https://github.com/julianshapiro/velocity/issues/548
......@@ -3001,20 +3001,15 @@ kss._loadAnimationLib = function () {
var behaviour = params.behaviour || 'queue';
delete params.behaviour;
var _params = {};
kss.each(params, function(value, key) {
_params[kss.camelCase(key)] = value;
});
_params.paused = false;
params.paused = false;
var currentTweens = gsap.getTweensOf(node);
if (currentTweens.length) {
switch (behaviour) {
case 'ignore':
return;
case 'combine':
_params.overwrite = 'auto';
params.overwrite = 'auto';
break
case 'finish':
kss.each(currentTweens, function(tween) {
......@@ -3023,21 +3018,21 @@ kss._loadAnimationLib = function () {
});
break;
case 'stop':
_params.overwrite = 'all'; // 'allOnStart' ?
params.overwrite = 'all'; // 'allOnStart' ?
kss.each(currentTweens, function(tween) {
tween.data = null;
});
break;
case 'queue':
default:
_params.paused = true;
params.paused = true;
}
}
_params.onComplete = startNext;
params.onComplete = startNext;
var tween = gsap.to(node, duration / 1000, _params);
if (_params.paused) {
var tween = gsap.to(node, duration / 1000, params);
if (params.paused) {
// Simply queue by attaching the tween to the last one's
// data property, activated in onComplete later on.
currentTweens[currentTweens.length-1].data = tween;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment