\r
_store = function(exp) {\r
$(exp).each(function() {\r
- $(this).data("resizable-alsoresize-start", {\r
- width: parseInt($(this).css('width'), 10), height: parseInt($(this).css('height'), 10),\r
+ $(this).data("resizable-alsoresize", {\r
+ width: parseInt($(this).width(), 10), height: parseInt($(this).height(), 10),\r
left: parseInt($(this).css('left'), 10), top: parseInt($(this).css('top'), 10)\r
});\r
});\r
\r
_alsoResize = function(exp, c) {\r
$(exp).each(function() {\r
- var start = $(this).data("resizable-alsoresize-start"), style = {}, css = c && c.length ? c : ['width', 'height', 'top', 'left'];\r
+ var start = $(this).data("resizable-alsoresize"), style = {}, css = c && c.length ? c : ['width', 'height', 'top', 'left'];\r
\r
$.each(css || ['width', 'height', 'top', 'left'], function(i, prop) {\r
- style[prop] = (start[prop] + delta[prop]) || null\r
+ var sum = (start[prop]||0) + (delta[prop]||0);\r
+ if (sum && sum >= 0)\r
+ style[prop] = sum || null;\r
});\r
- \r
$(this).css(style);\r
});\r
};\r