Skip to content

Commit

Permalink
Prevent content jumps in explode
Browse files Browse the repository at this point in the history
Partial solution for #206
  • Loading branch information
ef4 committed Mar 31, 2015
1 parent 2875a1f commit a2ae49e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/transitions/explode.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ function _explodePart(context, field, childContext, selector) {
child = elt.find(selector);
if (child.length > 0) {
childOffset = child.offset();
width = child.width();
height = child.height();
width = child.outerWidth();
height = child.outerHeight();
newChild = child.clone();

// Hide the original element
Expand All @@ -80,9 +80,9 @@ function _explodePart(context, field, childContext, selector) {
if (elt.css('visibility') === 'hidden') {
newChild.css({ visibility: 'hidden' });
}
newChild.width(width);
newChild.height(height);
newChild.appendTo(elt.parent());
newChild.outerWidth(width);
newChild.outerHeight(height);
var newParentOffset = newChild.offsetParent().offset();
newChild.css({
position: 'absolute',
Expand Down

0 comments on commit a2ae49e

Please sign in to comment.