Skip to content

Commit

Permalink
Build for Release
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmalonenz committed Mar 15, 2016
1 parent ad4176d commit 28de6bf
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 28 deletions.
11 changes: 4 additions & 7 deletions dist/amd/dragula.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ define(['exports', 'babel-runtime/helpers/create-class', 'babel-runtime/helpers/
this._initialSibling;
this._currentSibling;
this._copy;
this._renderTimer;
this._lastRenderTime = null;
this._lastDropTarget = null;
this._grabbed;
}
Expand Down Expand Up @@ -302,15 +302,12 @@ define(['exports', 'babel-runtime/helpers/create-class', 'babel-runtime/helpers/
if (item) {
_classes.rm(item, 'gu-transit');
}
if (this._renderTimer) {
clearTimeout(this._renderTimer);
}
this.dragging = false;
if (this._lastDropTarget) {
this.emitter.emit('out', item, this._lastDropTarget, this._source);
}
this.emitter.emit('dragend', item);
this._source = this._item = this._copy = this._initialSibling = this._currentSibling = this._renderTimer = this._lastDropTarget = null;
this._source = this._item = this._copy = this._initialSibling = this._currentSibling = this._lastRenderTime = this._lastDropTarget = null;
}
}, {
key: '_isInitialPlacement',
Expand Down Expand Up @@ -360,10 +357,10 @@ define(['exports', 'babel-runtime/helpers/create-class', 'babel-runtime/helpers/
return;
}

if (Date.now() - this._timeSinceLastMove <= MIN_TIME_BETWEEN_REDRAWS_MS) {
if (this._lastRenderTime !== null && Date.now() - this._lastRenderTime < MIN_TIME_BETWEEN_REDRAWS_MS) {
return;
}
this._timeSinceLastMove = Date.now();
this._lastRenderTime = Date.now();
e.preventDefault();

var moved = function moved(type) {
Expand Down
11 changes: 4 additions & 7 deletions dist/commonjs/dragula.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var Dragula = (function () {
this._initialSibling;
this._currentSibling;
this._copy;
this._renderTimer;
this._lastRenderTime = null;
this._lastDropTarget = null;
this._grabbed;
}
Expand Down Expand Up @@ -321,15 +321,12 @@ var Dragula = (function () {
if (item) {
classes.rm(item, 'gu-transit');
}
if (this._renderTimer) {
clearTimeout(this._renderTimer);
}
this.dragging = false;
if (this._lastDropTarget) {
this.emitter.emit('out', item, this._lastDropTarget, this._source);
}
this.emitter.emit('dragend', item);
this._source = this._item = this._copy = this._initialSibling = this._currentSibling = this._renderTimer = this._lastDropTarget = null;
this._source = this._item = this._copy = this._initialSibling = this._currentSibling = this._lastRenderTime = this._lastDropTarget = null;
}
}, {
key: '_isInitialPlacement',
Expand Down Expand Up @@ -379,10 +376,10 @@ var Dragula = (function () {
return;
}

if (Date.now() - this._timeSinceLastMove <= MIN_TIME_BETWEEN_REDRAWS_MS) {
if (this._lastRenderTime !== null && Date.now() - this._lastRenderTime < MIN_TIME_BETWEEN_REDRAWS_MS) {
return;
}
this._timeSinceLastMove = Date.now();
this._lastRenderTime = Date.now();
e.preventDefault();

var moved = function moved(type) {
Expand Down
11 changes: 4 additions & 7 deletions dist/es6/dragula.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class Dragula {
this._initialSibling; // reference sibling when grabbed
this._currentSibling; // reference sibling now
this._copy; // item used for copying
this._renderTimer; // timer for setTimeout renderMirrorImage
this._lastRenderTime = null; // last time we rendered the mirror
this._lastDropTarget = null; // last container item was over
this._grabbed; // holds mousedown context until first mousemove
}
Expand Down Expand Up @@ -290,15 +290,12 @@ export class Dragula {
if (item) {
classes.rm(item, 'gu-transit');
}
if (this._renderTimer) {
clearTimeout(this._renderTimer);
}
this.dragging = false;
if (this._lastDropTarget) {
this.emitter.emit('out', item, this._lastDropTarget, this._source);
}
this.emitter.emit('dragend', item);
this._source = this._item = this._copy = this._initialSibling = this._currentSibling = this._renderTimer = this._lastDropTarget = null;
this._source = this._item = this._copy = this._initialSibling = this._currentSibling = this._lastRenderTime = this._lastDropTarget = null;
}

_isInitialPlacement(target, s) {
Expand Down Expand Up @@ -341,10 +338,10 @@ export class Dragula {
return;
}

if (Date.now() - this._timeSinceLastMove <= MIN_TIME_BETWEEN_REDRAWS_MS) {
if (this._lastRenderTime !== null && Date.now() - this._lastRenderTime < MIN_TIME_BETWEEN_REDRAWS_MS) {
return;
}
this._timeSinceLastMove = Date.now();
this._lastRenderTime = Date.now();
e.preventDefault();

let moved = (type) => { this.emitter.emit(type, item, this._lastDropTarget, this._source); }
Expand Down
11 changes: 4 additions & 7 deletions dist/system/dragula.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ System.register(['babel-runtime/helpers/create-class', 'babel-runtime/helpers/cl
this._initialSibling;
this._currentSibling;
this._copy;
this._renderTimer;
this._lastRenderTime = null;
this._lastDropTarget = null;
this._grabbed;
}
Expand Down Expand Up @@ -320,15 +320,12 @@ System.register(['babel-runtime/helpers/create-class', 'babel-runtime/helpers/cl
if (item) {
classes.rm(item, 'gu-transit');
}
if (this._renderTimer) {
clearTimeout(this._renderTimer);
}
this.dragging = false;
if (this._lastDropTarget) {
this.emitter.emit('out', item, this._lastDropTarget, this._source);
}
this.emitter.emit('dragend', item);
this._source = this._item = this._copy = this._initialSibling = this._currentSibling = this._renderTimer = this._lastDropTarget = null;
this._source = this._item = this._copy = this._initialSibling = this._currentSibling = this._lastRenderTime = this._lastDropTarget = null;
}
}, {
key: '_isInitialPlacement',
Expand Down Expand Up @@ -378,10 +375,10 @@ System.register(['babel-runtime/helpers/create-class', 'babel-runtime/helpers/cl
return;
}

if (Date.now() - this._timeSinceLastMove <= MIN_TIME_BETWEEN_REDRAWS_MS) {
if (this._lastRenderTime !== null && Date.now() - this._lastRenderTime < MIN_TIME_BETWEEN_REDRAWS_MS) {
return;
}
this._timeSinceLastMove = Date.now();
this._lastRenderTime = Date.now();
e.preventDefault();

var moved = function moved(type) {
Expand Down

0 comments on commit 28de6bf

Please sign in to comment.