Skip to content

Commit

Permalink
0.0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
David Schäfer committed Nov 14, 2018
1 parent 51e04fd commit 377b8f7
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 15 deletions.
3 changes: 1 addition & 2 deletions bower.json
Expand Up @@ -2,7 +2,7 @@
"name": "attriboots",
"description": "",
"homepage": "https://github.com/okitu/attriboots",
"version": "0.0.14",
"version": "0.0.15",
"main": "dist/attriboots.js",
"author": {
"name": "David Schäfer",
Expand All @@ -14,7 +14,6 @@
"properties",
"attributes"
],
"homepage": "https://github.com/okitu/attriboots",
"ignore": [
"**/.*",
"node_modules",
Expand Down
37 changes: 27 additions & 10 deletions dist/attriboots.js
@@ -1,5 +1,5 @@
/**
* attriboots@0.0.13
* attriboots@0.0.15
* https://github.com/okitu/attriboots
*
* @license
Expand Down Expand Up @@ -392,6 +392,14 @@
return false;
}

/**
* Sets `previous` & `previousTarget` to `current` & `target` respectively.
*/

}, {
key: 'clearPrevious',
value: function clearPrevious() {}

//
// EventTarget Interface
// https://developer.mozilla.org/en-US/docs/Web/API/Event
Expand Down Expand Up @@ -675,7 +683,7 @@
var _this = possibleConstructorReturn(this, (NumberAttriboot.__proto__ || Object.getPrototypeOf(NumberAttriboot)).apply(this, arguments));

_this._target = value;
_this._lastTarget = value;
_this._previousTarget = value;
_this._current = value;
_this._previous = value;
_this._raw = value;
Expand Down Expand Up @@ -791,8 +799,6 @@
var targetChanged;

if (this.dirty) {

this._lastTarget = this._target;
this._target = this._current;
targetChanged = true;
} else {
Expand All @@ -804,6 +810,17 @@
return targetChanged;
}

/**
* Sets `previous` & `previousTarget` to `current` & `target` respectively.
*/

}, {
key: 'clearPrevious',
value: function clearPrevious() {
this._previousTarget = this._target;
this._previous = this._current;
}

/**
* Set `target`and update immediately
* @param {number] value
Expand Down Expand Up @@ -836,7 +853,7 @@
this._isAddingOffset = false;

// Target may have been clamped
var actualOffset = this._target - this._lastTarget;
var actualOffset = this._target - this._previousTarget;

if (actualOffset !== 0) {
this._start += actualOffset;
Expand Down Expand Up @@ -908,7 +925,7 @@

if (target == this._target) return;

this._lastTarget = this._target;
this._previousTarget = this._target;

if (!this._isAddingOffset) {
this._start = this.current;
Expand All @@ -929,9 +946,9 @@
*/

}, {
key: 'lastTarget',
key: 'previousTarget',
get: function get$$1() {
return this._lastTarget;
return this._previousTarget;
}

/**
Expand Down Expand Up @@ -1168,7 +1185,7 @@
this._isAddingOffset = false;

// Target may have been clamped
var actualOffset = this.target - this._lastTarget;
var actualOffset = this.target - this._previousTarget;

if (actualOffset !== 0) {
this._start += actualOffset;
Expand Down Expand Up @@ -1260,7 +1277,7 @@

if (target == this._target) return;

this._lastTarget = this.target;
this._previousTarget = this.target;

if (!this._isAddingOffset) {
this._start = this.current;
Expand Down

0 comments on commit 377b8f7

Please sign in to comment.