draggable-helper
Advanced tools
Comparing version 1.0.12 to 1.0.13
/*! | ||
* draggable-helper v1.0.12 | ||
* draggable-helper v1.0.13 | ||
* (c) 2018-present phphe <phphe@outlook.com> (https://github.com/phphe) | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* draggable-helper v1.0.12 | ||
* draggable-helper v1.0.13 | ||
* (c) 2018-present phphe <phphe@outlook.com> (https://github.com/phphe) | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* draggable-helper v1.0.12 | ||
* draggable-helper v1.0.13 | ||
* (c) 2018-present phphe <phphe@outlook.com> (https://github.com/phphe) | ||
@@ -13,3 +13,3 @@ * Released under the MIT License. | ||
/*! | ||
* helper-js v1.1.1 | ||
* helper-js v1.1.2 | ||
* (c) 2018-present phphe <phphe@outlook.com> (https://github.com/phphe) | ||
@@ -166,2 +166,26 @@ * Released under the MIT License. | ||
}; | ||
var offsetParent = el.offsetParent; | ||
if (!offsetParent || offsetParent === document.body && getComputedStyle(document.body).position === 'static') { | ||
offsetParent = document.body.parentElement; | ||
} | ||
var ps = { | ||
x: el.offsetLeft, | ||
y: el.offsetTop | ||
}; | ||
var parent = el; | ||
while (true) { | ||
parent = parent.parentElement; | ||
if (parent === offsetParent || !parent) { | ||
break; | ||
} | ||
ps.x -= parent.scrollLeft; | ||
ps.y -= parent.scrollTop; | ||
} | ||
return ps; | ||
} | ||
@@ -168,0 +192,0 @@ function backupAttr(el, name) { |
/*! | ||
* draggable-helper v1.0.12 | ||
* draggable-helper v1.0.13 | ||
* (c) 2018-present phphe <phphe@outlook.com> (https://github.com/phphe) | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
{ | ||
"name": "draggable-helper", | ||
"version": "1.0.12", | ||
"version": "1.0.13", | ||
"description": "", | ||
@@ -25,5 +25,5 @@ "main": "dist/draggable-helper.cjs.js", | ||
"drag-event-service": "0.0.3", | ||
"helper-js": "^1.1.1" | ||
"helper-js": "^1.1.2" | ||
}, | ||
"license": "MIT" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
103495
1246
Updatedhelper-js@^1.1.2