Skip to content
Browse files

Margins are no longer part of the element dimension

  • Loading branch information...
1 parent c386d87 commit d3de90f8e5f854ccfc1f0b3a4d57acd0649a9110 @johnny committed Jun 21, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 source/js/jquery-sortable.js
View
6 source/js/jquery-sortable.js
@@ -149,11 +149,13 @@
var el = array[i].el ? array[i].el : $(array[i]),
// use fitting method
pos = el[offsetMethod]()
+ pos.left += parseInt(el.css('margin-left'), 10)
+ pos.right += parseInt(el.css('margin-right'),10)
dimensions[i] = [
pos.left,
- pos.left + el.outerWidth(true),
+ pos.left + el.outerWidth(),
pos.top,
- pos.top + el.outerHeight(true)
+ pos.top + el.outerHeight()
]
}
}

0 comments on commit d3de90f

Please sign in to comment.
Something went wrong with that request. Please try again.