Skip to content

Commit

Permalink
inertia: remove ending prop from status object
Browse files Browse the repository at this point in the history
  • Loading branch information
taye committed Jan 10, 2016
1 parent 7244e7f commit 2a6e790
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/inertia.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Interaction.signals.on('new', function (interaction) {
active : false,
smoothEnd : false,
allowResume: false,
ending : false,

startEvent: null,
upCoords : {},
Expand Down Expand Up @@ -167,7 +166,7 @@ Interaction.signals.on('stop-active', function ({ interaction }) {

if (status.active) {
animationFrame.cancel(status.i);
status.active = status.ending = false;
status.active = false;
interaction.simulation = null;
}
});
Expand Down Expand Up @@ -224,14 +223,12 @@ function inertiaFrame () {
status.i = animationFrame.request(this.boundInertiaFrame);
}
else {
status.ending = true;

status.sx = status.modifiedXe;
status.sy = status.modifiedYe;

this.doMove();
this.end(status.startEvent);
status.active = status.ending = false;
status.active = false;
this.simulation = null;
}

Expand All @@ -254,16 +251,14 @@ function smoothEndFrame () {
status.i = animationFrame.request(this.boundSmoothEndFrame);
}
else {
status.ending = true;

status.sx = status.xe;
status.sy = status.ye;

this.pointerMove(status.startEvent, status.startEvent);
this.end(status.startEvent);

status.smoothEnd =
status.active = status.ending = false;
status.active = false;
this.simulation = null;
}
}
Expand Down

0 comments on commit 2a6e790

Please sign in to comment.