From 6f2849fd382868d1c29bca9d4624d76756049916 Mon Sep 17 00:00:00 2001 From: Eduardo Lundgren Date: Sun, 1 Jun 2008 20:06:21 +0000 Subject: [PATCH] alsoResize IE bug fixes --- ui/source/ui.resizable.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ui/source/ui.resizable.js b/ui/source/ui.resizable.js index e94cfee58..10a2ce2f5 100644 --- a/ui/source/ui.resizable.js +++ b/ui/source/ui.resizable.js @@ -684,8 +684,8 @@ _store = function(exp) { $(exp).each(function() { - $(this).data("resizable-alsoresize-start", { - width: parseInt($(this).css('width'), 10), height: parseInt($(this).css('height'), 10), + $(this).data("resizable-alsoresize", { + width: parseInt($(this).width(), 10), height: parseInt($(this).height(), 10), left: parseInt($(this).css('left'), 10), top: parseInt($(this).css('top'), 10) }); }); @@ -708,12 +708,13 @@ _alsoResize = function(exp, c) { $(exp).each(function() { - var start = $(this).data("resizable-alsoresize-start"), style = {}, css = c && c.length ? c : ['width', 'height', 'top', 'left']; + var start = $(this).data("resizable-alsoresize"), style = {}, css = c && c.length ? c : ['width', 'height', 'top', 'left']; $.each(css || ['width', 'height', 'top', 'left'], function(i, prop) { - style[prop] = (start[prop] + delta[prop]) || null + var sum = (start[prop]||0) + (delta[prop]||0); + if (sum && sum >= 0) + style[prop] = sum || null; }); - $(this).css(style); }); }; -- 2.39.5