From 5374b6339aec9a769d7999d68066b0e463735fad Mon Sep 17 00:00:00 2001 From: Jack Galanciak Date: Mon, 22 Mar 2010 15:44:56 +0100 Subject: [PATCH] Fixed IE invalid argument issue --- jquery.quicksand.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/jquery.quicksand.js b/jquery.quicksand.js index f0c4672..2c2fa56 100644 --- a/jquery.quicksand.js +++ b/jquery.quicksand.js @@ -99,10 +99,15 @@ Github site: http://github.com/razorjack/quicksand } // perform custom corrections from options (use when Quicksand fails to detect proper correction) + if (isNaN(correctionOffset.left)) { + correctionOffset.left = 0; + } + if (isNaN(correctionOffset.top)) { + correctionOffset.top = 0; + } + correctionOffset.left -= options.dx; correctionOffset.top -= options.dy; - - // keeps nodes after source container, holding their position $sourceParent.css('height', $(this).height()); @@ -128,6 +133,7 @@ Github site: http://github.com/razorjack/quicksand rawObj.style.position = 'absolute'; rawObj.style.margin = '0'; + rawObj.style.top = (offsets[i].top - parseFloat(rawObj.style.marginTop) - correctionOffset.top + dy) + 'px'; rawObj.style.left = (offsets[i].left - parseFloat(rawObj.style.marginLeft) - correctionOffset.left + dx) + 'px'; });