Skip to content

Commit

Permalink
1.10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
owen-m1 committed Dec 25, 2019
1 parent aae2c97 commit 2addddd
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 35 deletions.
22 changes: 14 additions & 8 deletions Sortable.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**!
* Sortable 1.10.1
* Sortable 1.10.2
* @author RubaXa <[email protected]>
* @author owenm <[email protected]>
* @license MIT
Expand Down Expand Up @@ -132,7 +132,7 @@
throw new TypeError("Invalid attempt to spread non-iterable instance");
}

var version = "1.10.1";
var version = "1.10.2";

function userAgent(pattern) {
if (typeof window !== 'undefined' && window.navigator) {
Expand Down Expand Up @@ -266,7 +266,7 @@
} while (!selfOnly && (el = el.parentNode));
}

var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix;
var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
/*jshint -W056 */

return matrixFn && new matrixFn(appliedTransforms);
Expand All @@ -291,10 +291,12 @@
}

function getWindowScrollingElement() {
if (IE11OrLess) {
return document.documentElement;
var scrollingElement = document.scrollingElement;

if (scrollingElement) {
return scrollingElement;
} else {
return document.scrollingElement;
return document.documentElement;
}
}
/**
Expand Down Expand Up @@ -1631,7 +1633,7 @@
fallbackTolerance = options.fallbackTolerance,
fallbackOffset = options.fallbackOffset,
touch = evt.touches ? evt.touches[0] : evt,
ghostMatrix = ghostEl && matrix(ghostEl),
ghostMatrix = ghostEl && matrix(ghostEl, true),
scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
Expand Down Expand Up @@ -2136,6 +2138,8 @@
css(document.body, 'user-select', '');
}

css(dragEl, 'transform', '');

if (evt) {
if (moved) {
evt.cancelable && evt.preventDefault();
Expand Down Expand Up @@ -2400,6 +2404,8 @@

this._onDrop();

this._disableDelayedDragEvents();

sortables.splice(sortables.indexOf(this.el), 1);
this.el = el = null;
},
Expand Down Expand Up @@ -3540,7 +3546,7 @@
off(document, 'keyup', this._checkKeyUp);
},
_deselectMultiDrag: function _deselectMultiDrag(evt) {
if (dragStarted) return; // Only deselect if selection is in this sortable
if (typeof dragStarted !== "undefined" && dragStarted) return; // Only deselect if selection is in this sortable

if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable

Expand Down
4 changes: 2 additions & 2 deletions Sortable.min.js

Large diffs are not rendered by default.

22 changes: 14 additions & 8 deletions modular/sortable.complete.esm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**!
* Sortable 1.10.1
* Sortable 1.10.2
* @author RubaXa <[email protected]>
* @author owenm <[email protected]>
* @license MIT
Expand Down Expand Up @@ -126,7 +126,7 @@ function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance");
}

var version = "1.10.1";
var version = "1.10.2";

function userAgent(pattern) {
if (typeof window !== 'undefined' && window.navigator) {
Expand Down Expand Up @@ -260,7 +260,7 @@ function matrix(el, selfOnly) {
} while (!selfOnly && (el = el.parentNode));
}

var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix;
var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
/*jshint -W056 */

return matrixFn && new matrixFn(appliedTransforms);
Expand All @@ -285,10 +285,12 @@ function find(ctx, tagName, iterator) {
}

function getWindowScrollingElement() {
if (IE11OrLess) {
return document.documentElement;
var scrollingElement = document.scrollingElement;

if (scrollingElement) {
return scrollingElement;
} else {
return document.scrollingElement;
return document.documentElement;
}
}
/**
Expand Down Expand Up @@ -1625,7 +1627,7 @@ Sortable.prototype =
fallbackTolerance = options.fallbackTolerance,
fallbackOffset = options.fallbackOffset,
touch = evt.touches ? evt.touches[0] : evt,
ghostMatrix = ghostEl && matrix(ghostEl),
ghostMatrix = ghostEl && matrix(ghostEl, true),
scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
Expand Down Expand Up @@ -2130,6 +2132,8 @@ Sortable.prototype =
css(document.body, 'user-select', '');
}

css(dragEl, 'transform', '');

if (evt) {
if (moved) {
evt.cancelable && evt.preventDefault();
Expand Down Expand Up @@ -2394,6 +2398,8 @@ Sortable.prototype =

this._onDrop();

this._disableDelayedDragEvents();

sortables.splice(sortables.indexOf(this.el), 1);
this.el = el = null;
},
Expand Down Expand Up @@ -3534,7 +3540,7 @@ function MultiDragPlugin() {
off(document, 'keyup', this._checkKeyUp);
},
_deselectMultiDrag: function _deselectMultiDrag(evt) {
if (dragStarted) return; // Only deselect if selection is in this sortable
if (typeof dragStarted !== "undefined" && dragStarted) return; // Only deselect if selection is in this sortable

if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable

Expand Down
22 changes: 14 additions & 8 deletions modular/sortable.core.esm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**!
* Sortable 1.10.1
* Sortable 1.10.2
* @author RubaXa <[email protected]>
* @author owenm <[email protected]>
* @license MIT
Expand Down Expand Up @@ -126,7 +126,7 @@ function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance");
}

var version = "1.10.1";
var version = "1.10.2";

function userAgent(pattern) {
if (typeof window !== 'undefined' && window.navigator) {
Expand Down Expand Up @@ -260,7 +260,7 @@ function matrix(el, selfOnly) {
} while (!selfOnly && (el = el.parentNode));
}

var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix;
var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
/*jshint -W056 */

return matrixFn && new matrixFn(appliedTransforms);
Expand All @@ -285,10 +285,12 @@ function find(ctx, tagName, iterator) {
}

function getWindowScrollingElement() {
if (IE11OrLess) {
return document.documentElement;
var scrollingElement = document.scrollingElement;

if (scrollingElement) {
return scrollingElement;
} else {
return document.scrollingElement;
return document.documentElement;
}
}
/**
Expand Down Expand Up @@ -1625,7 +1627,7 @@ Sortable.prototype =
fallbackTolerance = options.fallbackTolerance,
fallbackOffset = options.fallbackOffset,
touch = evt.touches ? evt.touches[0] : evt,
ghostMatrix = ghostEl && matrix(ghostEl),
ghostMatrix = ghostEl && matrix(ghostEl, true),
scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
Expand Down Expand Up @@ -2130,6 +2132,8 @@ Sortable.prototype =
css(document.body, 'user-select', '');
}

css(dragEl, 'transform', '');

if (evt) {
if (moved) {
evt.cancelable && evt.preventDefault();
Expand Down Expand Up @@ -2394,6 +2398,8 @@ Sortable.prototype =

this._onDrop();

this._disableDelayedDragEvents();

sortables.splice(sortables.indexOf(this.el), 1);
this.el = el = null;
},
Expand Down Expand Up @@ -3536,7 +3542,7 @@ function MultiDragPlugin() {
off(document, 'keyup', this._checkKeyUp);
},
_deselectMultiDrag: function _deselectMultiDrag(evt) {
if (dragStarted) return; // Only deselect if selection is in this sortable
if (typeof dragStarted !== "undefined" && dragStarted) return; // Only deselect if selection is in this sortable

if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable

Expand Down
22 changes: 14 additions & 8 deletions modular/sortable.esm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**!
* Sortable 1.10.1
* Sortable 1.10.2
* @author RubaXa <[email protected]>
* @author owenm <[email protected]>
* @license MIT
Expand Down Expand Up @@ -126,7 +126,7 @@ function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance");
}

var version = "1.10.1";
var version = "1.10.2";

function userAgent(pattern) {
if (typeof window !== 'undefined' && window.navigator) {
Expand Down Expand Up @@ -260,7 +260,7 @@ function matrix(el, selfOnly) {
} while (!selfOnly && (el = el.parentNode));
}

var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix;
var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
/*jshint -W056 */

return matrixFn && new matrixFn(appliedTransforms);
Expand All @@ -285,10 +285,12 @@ function find(ctx, tagName, iterator) {
}

function getWindowScrollingElement() {
if (IE11OrLess) {
return document.documentElement;
var scrollingElement = document.scrollingElement;

if (scrollingElement) {
return scrollingElement;
} else {
return document.scrollingElement;
return document.documentElement;
}
}
/**
Expand Down Expand Up @@ -1625,7 +1627,7 @@ Sortable.prototype =
fallbackTolerance = options.fallbackTolerance,
fallbackOffset = options.fallbackOffset,
touch = evt.touches ? evt.touches[0] : evt,
ghostMatrix = ghostEl && matrix(ghostEl),
ghostMatrix = ghostEl && matrix(ghostEl, true),
scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
Expand Down Expand Up @@ -2130,6 +2132,8 @@ Sortable.prototype =
css(document.body, 'user-select', '');
}

css(dragEl, 'transform', '');

if (evt) {
if (moved) {
evt.cancelable && evt.preventDefault();
Expand Down Expand Up @@ -2394,6 +2398,8 @@ Sortable.prototype =

this._onDrop();

this._disableDelayedDragEvents();

sortables.splice(sortables.indexOf(this.el), 1);
this.el = el = null;
},
Expand Down Expand Up @@ -3534,7 +3540,7 @@ function MultiDragPlugin() {
off(document, 'keyup', this._checkKeyUp);
},
_deselectMultiDrag: function _deselectMultiDrag(evt) {
if (dragStarted) return; // Only deselect if selection is in this sortable
if (typeof dragStarted !== "undefined" && dragStarted) return; // Only deselect if selection is in this sortable

if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sortablejs",
"exportName": "Sortable",
"version": "1.10.1",
"version": "1.10.2",
"devDependencies": {
"@babel/core": "^7.4.4",
"@babel/plugin-transform-object-assign": "^7.2.0",
Expand Down

0 comments on commit 2addddd

Please sign in to comment.