aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEduardo Lundgren <eduardolundgren@gmail.com>2008-06-03 20:00:50 +0000
committerEduardo Lundgren <eduardolundgren@gmail.com>2008-06-03 20:00:50 +0000
commitb294b050435f7e97037e17b7abfb8bb8476c0914 (patch)
treede4dfb8d841f03496e7c47a950c721eda18d07d0
parentef18dbbd76f0b332cae2facb5f3bca3be3cbe225 (diff)
downloadjquery-ui-b294b050435f7e97037e17b7abfb8bb8476c0914.tar.gz
jquery-ui-b294b050435f7e97037e17b7abfb8bb8476c0914.zip
Resizable grid bug on IE - fixed #2939
-rw-r--r--ui/source/ui.resizable.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/source/ui.resizable.js b/ui/source/ui.resizable.js
index 286f61d7f..2203f3945 100644
--- a/ui/source/ui.resizable.js
+++ b/ui/source/ui.resizable.js
@@ -582,7 +582,7 @@ $.ui.plugin.add("resizable", "grid", {
resize: function(e, ui) {
var o = ui.options, self = $(this).data("resizable"), cs = self.size, os = self.originalSize, op = self.originalPosition, a = self.axis, ratio = o._aspectRatio || e.shiftKey;
o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid;
- var ox = Math.round((cs.width - os.width) / o.grid[0]) * o.grid[0], oy = Math.round((cs.height - os.height) / o.grid[1]) * o.grid[1];
+ var ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1);
if (/^(se|s|e)$/.test(a)) {
self.size.width = os.width + ox;