Skip to content

Commit

Permalink
fix: Tween.to & Tween.from params add default value
Browse files Browse the repository at this point in the history
  • Loading branch information
06wj committed Apr 26, 2017
1 parent 2002f04 commit 653cf36
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tween/Tween.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ return Class.create(/** @lends Tween.prototype */{
},

target: null,
duration: 0,
duration: 1000,
delay: 0,
paused: false,
loop: false,
Expand Down Expand Up @@ -513,6 +513,7 @@ return Class.create(/** @lends Tween.prototype */{
* @returns {Tween|Array} 一个Tween实例对象或Tween实例数组。
*/
fromTo: function(target, fromProps, toProps, params){
params = params || {};
var isArray = target instanceof Array;
target = isArray ? target : [target];

Expand Down

0 comments on commit 653cf36

Please sign in to comment.