Skip to content

Commit

Permalink
src : use padding for offset
Browse files Browse the repository at this point in the history
  • Loading branch information
desandro committed Jan 30, 2012
1 parent 0bfde75 commit 7c93bea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions jquery.isotope.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Isotope v1.5.08
* Isotope v1.5.09
* An exquisite jQuery plugin for magical layouts
* http://isotope.metafizzy.co
*
Expand Down Expand Up @@ -388,9 +388,10 @@
this.reloadItems();

// get top left position of where the bricks should be
var $cursor = $( document.createElement('div') ).prependTo( this.element );
this.offset = $cursor.position();
$cursor.remove();
this.offset = {
left: parseInt( this.element.css('padding-left'), 10 ),
top: parseInt( this.element.css('padding-top'), 10 )
};

// add isotope class first time around
var instance = this;
Expand Down
Loading

0 comments on commit 7c93bea

Please sign in to comment.