Closes #5, using $.offset instead of clientHeight

This commit is contained in:
László Károlyi 2014-04-22 20:49:47 +02:00
parent 155a537cb5
commit c3f949a404
2 changed files with 5 additions and 5 deletions

View File

@ -94,11 +94,11 @@
* @return boolean The parent's _mouseStart return value * @return boolean The parent's _mouseStart return value
*/ */
_mouseStart: function (event) { _mouseStart: function (event) {
var pos = this.scrollElement.offset();
if ( if (
(event.pageX > this.scrollElement.prop('clientWidth') + (event.pageX > this.scrollElement.prop('clientWidth') + pos.left) ||
this.scrollElement.prop('offsetLeft')) || (event.pageY > this.scrollElement.prop('clientHeight') + pos.top)
(event.pageY > this.scrollElement.prop('clientHeight') + ) {
this.scrollElement.prop('offsetTop'))) {
return false; return false;
} }
var retValue = $.ui.selectable.prototype._mouseStart.call(this, var retValue = $.ui.selectable.prototype._mouseStart.call(this,

View File

@ -1,6 +1,6 @@
{ {
"name": "ui-selectableScroll", "name": "ui-selectableScroll",
"version": "0.1.5", "version": "0.1.6",
"title": "An extended jQuery-ui selectable with scroll capabilities", "title": "An extended jQuery-ui selectable with scroll capabilities",
"licenses": [{ "licenses": [{
"type": "GPLv3", "type": "GPLv3",