From cef66ee99f3924f5f74ac8c3f3190bfd125bd845 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Tue, 16 Sep 2008 12:40:48 +0000 Subject: sortable: Fixed the floating functional demo, implemented forcePlaceholderSize --- ui/ui.sortable.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ui/ui.sortable.js') diff --git a/ui/ui.sortable.js b/ui/ui.sortable.js index fd69b78e8..2ec6291de 100644 --- a/ui/ui.sortable.js +++ b/ui/ui.sortable.js @@ -302,9 +302,9 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, { return el; }, update: function(container, p) { - if(className) return; - if(!p.height()) { p.height(self.currentItem.innerHeight()); }; - if(!p.width()) { p.width(self.currentItem.innerWidth()); }; + if(className && !o.forcePlaceholderSize) return; + if(!p.height()) { p.height(self.currentItem.innerHeight() - parseInt(self.currentItem.css('paddingTop')||0) - parseInt(self.currentItem.css('paddingBottom')||0)); }; + if(!p.width()) { p.width(self.currentItem.innerWidth() - parseInt(self.currentItem.css('paddingLeft')||0) - parseInt(self.currentItem.css('paddingRight')||0)); }; } }; } -- cgit v1.2.3