From 52929d2f86668c71fa8a889da5dc3e726bef55ee Mon Sep 17 00:00:00 2001 From: Jared Mellentine Date: Thu, 18 Jun 2015 17:18:13 -0700 Subject: [PATCH] Use outerHeight/outerWidth on dragged items Padded/bordered items that were dragged and sized using height/width were incorrectly sized. --- source/js/jquery-sortable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/js/jquery-sortable.js b/source/js/jquery-sortable.js index 52c2432..5914b97 100644 --- a/source/js/jquery-sortable.js +++ b/source/js/jquery-sortable.js @@ -94,8 +94,8 @@ // Therefore it might not be the container, that actually contains the item. onDragStart: function ($item, container, _super, event) { $item.css({ - height: $item.height(), - width: $item.width() + height: $item.outerHeight(), + width: $item.outerWidth() }) $item.addClass(container.group.options.draggedClass) $("body").addClass(container.group.options.bodyClass)