Skip to content

Commit

Permalink
column moving fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Dec 5, 2014
1 parent bbf2586 commit 79a5f2a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/features/move-columns/js/column-movable.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,13 @@
//Left of cloned element should be aligned to original header cell.
movingElm.addClass('movingColumn');
var movingElementStyles = {};
var elmTop = $elm[0].getBoundingClientRect().top;
var elmLeft = $elm[0].getBoundingClientRect().left;
movingElementStyles.left = (elmLeft - gridLeft) + 'px';
var gridRight = $scope.grid.element[0].getBoundingClientRect().right;
var elmRight = $elm[0].getBoundingClientRect().right;
if (elmRight > gridRight) {
reducedWidth = $scope.col.drawnWidth + (gridRight - elmRight);
movingElementStyles.width = reducedWidth + 'px';
movingElementStyles.top = elmTop + 'px';
}
movingElm.css(movingElementStyles);
};
Expand Down

0 comments on commit 79a5f2a

Please sign in to comment.