Skip to content

Commit

Permalink
Optimize final transition
Browse files Browse the repository at this point in the history
  • Loading branch information
nagix committed Mar 14, 2019
1 parent 5ea4f8e commit 570633c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/core/core.element.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,8 @@ helpers.extend(Element.prototype, {
var start = me._start;
var view = me._view;

// No animation -> No Transition
if (!model || ease === 1) {
me._view = helpers.clone(model);
if (!model) {
me._view = model;
me._start = null;
return me;
}
Expand All @@ -95,6 +94,10 @@ helpers.extend(Element.prototype, {

interpolate(start, view, model, ease);

if (ease === 1) {
me._start = null;
}

return me;
},

Expand Down

0 comments on commit 570633c

Please sign in to comment.