Skip to content

Commit

Permalink
v2.5.7
Browse files Browse the repository at this point in the history
  • Loading branch information
anseki committed Jul 14, 2018
1 parent e9fcc4d commit 595232b
Show file tree
Hide file tree
Showing 9 changed files with 117 additions and 43 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plain-draggable",
"version": "2.5.6",
"version": "2.5.7",
"description": "The simple and high performance library to allow HTML/SVG element to be dragged.",
"keywords": [
"draggable",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plain-draggable",
"version": "2.5.6",
"version": "2.5.7",
"title": "PlainDraggable",
"description": "The simple and high performance library to allow HTML/SVG element to be dragged.",
"keywords": [
Expand Down
17 changes: 11 additions & 6 deletions plain-draggable-limit-debug.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ function dragEnd(props) {
}

activeProps = null;
pointerEvent.end(); // Reset pointer (activeProps must be null because this calls endHandler)
pointerEvent.cancel(); // Reset pointer (activeProps must be null because this calls endHandler)
if (props.onDragEnd) {
props.onDragEnd({ left: props.elementBBox.left, top: props.elementBBox.top });
}
Expand Down Expand Up @@ -993,11 +993,16 @@ pointerEvent.addMoveHandler(document, function (pointerXY) {
}
});

pointerEvent.addEndHandler(document, function () {
if (activeProps) {
dragEnd(activeProps);
}
});
{
var endHandler = function endHandler() {
if (activeProps) {
dragEnd(activeProps);
}
};

pointerEvent.addEndHandler(document, endHandler);
pointerEvent.addCancelHandler(document, endHandler);
}

{
var initDoc = function initDoc() {
Expand Down
17 changes: 11 additions & 6 deletions plain-draggable-limit.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ function dragEnd(props) {
}

activeProps = null;
pointerEvent.end(); // Reset pointer (activeProps must be null because this calls endHandler)
pointerEvent.cancel(); // Reset pointer (activeProps must be null because this calls endHandler)
if (props.onDragEnd) {
props.onDragEnd({ left: props.elementBBox.left, top: props.elementBBox.top });
}
Expand Down Expand Up @@ -977,11 +977,16 @@ pointerEvent.addMoveHandler(document, function (pointerXY) {
}
});

pointerEvent.addEndHandler(document, function () {
if (activeProps) {
dragEnd(activeProps);
}
});
{
var endHandler = function endHandler() {
if (activeProps) {
dragEnd(activeProps);
}
};

pointerEvent.addEndHandler(document, endHandler);
pointerEvent.addCancelHandler(document, endHandler);
}

{
var initDoc = function initDoc() {
Expand Down
4 changes: 2 additions & 2 deletions plain-draggable-limit.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion plain-draggable.min.js

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions src/plain-draggable-limit.proc.js
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ function dragEnd(props) {
if (draggingClass) { classList.remove(draggingClass); }

activeProps = null;
pointerEvent.end(); // Reset pointer (activeProps must be null because this calls endHandler)
pointerEvent.cancel(); // Reset pointer (activeProps must be null because this calls endHandler)
if (props.onDragEnd) {
props.onDragEnd({left: props.elementBBox.left, top: props.elementBBox.top});
}
Expand Down Expand Up @@ -827,9 +827,14 @@ pointerEvent.addMoveHandler(document, pointerXY => {
}
});

pointerEvent.addEndHandler(document, () => {
if (activeProps) { dragEnd(activeProps); }
});
{
function endHandler() {
if (activeProps) { dragEnd(activeProps); }
}

pointerEvent.addEndHandler(document, endHandler);
pointerEvent.addCancelHandler(document, endHandler);
}

{
function initDoc() {
Expand Down
101 changes: 80 additions & 21 deletions test/plain-draggable-limit.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/plain-draggable-limit.js.map

Large diffs are not rendered by default.

0 comments on commit 595232b

Please sign in to comment.