diff options
author | Paul Bakaus <paul.bakaus@googlemail.com> | 2008-09-16 12:40:48 +0000 |
---|---|---|
committer | Paul Bakaus <paul.bakaus@googlemail.com> | 2008-09-16 12:40:48 +0000 |
commit | cef66ee99f3924f5f74ac8c3f3190bfd125bd845 (patch) | |
tree | 0098d49f57a3de62038680c3e9536f27ce18b6af /ui | |
parent | fd40ff0fe036cf4c38b93f0345505052f83dbb66 (diff) | |
download | jquery-ui-cef66ee99f3924f5f74ac8c3f3190bfd125bd845.tar.gz jquery-ui-cef66ee99f3924f5f74ac8c3f3190bfd125bd845.zip |
sortable: Fixed the floating functional demo, implemented forcePlaceholderSize
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ui.sortable.js | 6 |
1 files changed, 3 insertions, 3 deletions
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)); }; } }; } |