From 90591c6f8f830146c7c992608ba13bf6419677e1 Mon Sep 17 00:00:00 2001 From: Jukka Koskinen Date: Wed, 30 Jul 2014 11:36:36 +0300 Subject: [PATCH] Fixed placeholder size for box-sizing: border-box --- touch-dnd.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/touch-dnd.js b/touch-dnd.js index 35f4aaa..58470ab 100644 --- a/touch-dnd.js +++ b/touch-dnd.js @@ -612,8 +612,8 @@ } if (this.opts.forcePlaceholderSize) { - this.placeholder.height(dragging.el.height()) - this.placeholder.width(dragging.el.width()) + this.placeholder.height(parseFloat(dragging.el.css('height'))) + this.placeholder.width(parseFloat(dragging.el.css('width'))) } dragging.adjustPlacement(e) @@ -643,8 +643,8 @@ dragging.placeholder = this.placeholder if (this.opts.forcePlaceholderSize) { - this.placeholder.height(dragging.el.height()) - this.placeholder.width(dragging.el.width()) + this.placeholder.height(parseFloat(dragging.el.css('height'))) + this.placeholder.width(parseFloat(dragging.el.css('width'))) } if (!isContainer) { @@ -831,4 +831,4 @@ items: 'li, div', placeholder: 'placeholder' }) -}(window.Zepto || window.jQuery) \ No newline at end of file +}(window.Zepto || window.jQuery)