aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/js/ui/jquery.ui.resizable.js
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2014-06-24 20:16:59 +0000
committerrvelices <rv-github@modusoptimus.com>2014-06-24 20:16:59 +0000
commit09228a746f3a67ea80ab6cc6013f535da8332a64 (patch)
tree15107374e3de6b8da403af5b75f828c7ea77315b /themes/default/js/ui/jquery.ui.resizable.js
parent03a3d1830cf67eb468bf4e48a879d2994055a492 (diff)
upgrade jquery ui from 1.10.1 to 1.10.4
git-svn-id: http://piwigo.org/svn/trunk@28780 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'themes/default/js/ui/jquery.ui.resizable.js')
-rw-r--r--themes/default/js/ui/jquery.ui.resizable.js30
1 files changed, 20 insertions, 10 deletions
diff --git a/themes/default/js/ui/jquery.ui.resizable.js b/themes/default/js/ui/jquery.ui.resizable.js
index 66af7214c..3ff8dc01a 100644
--- a/themes/default/js/ui/jquery.ui.resizable.js
+++ b/themes/default/js/ui/jquery.ui.resizable.js
@@ -1,8 +1,8 @@
/*!
- * jQuery UI Resizable 1.10.1
+ * jQuery UI Resizable 1.10.4
* http://jqueryui.com
*
- * Copyright 2013 jQuery Foundation and other contributors
+ * Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
@@ -24,7 +24,7 @@ function isNumber(value) {
}
$.widget("ui.resizable", $.ui.mouse, {
- version: "1.10.1",
+ version: "1.10.4",
widgetEventPrefix: "resize",
options: {
alsoResize: false,
@@ -293,7 +293,7 @@ $.widget("ui.resizable", $.ui.mouse, {
//Store needed variables
this.offset = this.helper.offset();
this.position = { left: curleft, top: curtop };
- this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
+ this.size = this._helper ? { width: this.helper.width(), height: this.helper.height() } : { width: el.width(), height: el.height() };
this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
this.originalPosition = { left: curleft, top: curtop };
this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };
@@ -774,8 +774,8 @@ $.ui.plugin.add("resizable", "containment", {
isParent = that.containerElement.get(0) === that.element.parent().get(0);
isOffsetRelative = /relative|absolute/.test(that.containerElement.css("position"));
- if(isParent && isOffsetRelative) {
- woset -= that.parentData.left;
+ if ( isParent && isOffsetRelative ) {
+ woset -= Math.abs( that.parentData.left );
}
if (woset + that.size.width >= that.parentData.width) {
@@ -956,10 +956,20 @@ $.ui.plugin.add("resizable", "grid", {
that.size.height = newHeight;
that.position.left = op.left - ox;
} else {
- that.size.width = newWidth;
- that.size.height = newHeight;
- that.position.top = op.top - oy;
- that.position.left = op.left - ox;
+ if ( newHeight - gridY > 0 ) {
+ that.size.height = newHeight;
+ that.position.top = op.top - oy;
+ } else {
+ that.size.height = gridY;
+ that.position.top = op.top + os.height - gridY;
+ }
+ if ( newWidth - gridX > 0 ) {
+ that.size.width = newWidth;
+ that.position.left = op.left - ox;
+ } else {
+ that.size.width = gridX;
+ that.position.left = op.left + os.width - gridX;
+ }
}
}