Skip to content

Commit

Permalink
Fix right table overflowing in side-by-side animation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo Chen committed Oct 7, 2011
1 parent 5f3f456 commit c3f20c9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions public/commit.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,9 @@ window.Commit =
@originalContainerWidth ?= container.width()
@numberColumnOuterWidth ?= leftCodeTable.find(".leftNumber").outerWidth()
@numberColumnWidth ?= leftCodeTable.find(".leftNumber").width()
rightCodeTable.width(@originalLeftWidth)
leftCodeTable.width(@originalLeftWidth)
rightCodeTable.css("left" : @numberColumnOuterWidth)
rightCodeTable.width(@originalLeftWidth - @numberColumnOuterWidth)

# show and hide the appropriate elements in the 2 tables
rightCodeTable.show()
Expand Down Expand Up @@ -371,11 +371,11 @@ window.Commit =

collapseCodeTablesIntoOne = () =>
# move right table to the middle, and make it width of rest of page
rightCodeTable.animate(
{ "left": @numberColumnOuterWidth, "width" : @originalLeftWidth }, @.SIDE_BY_SIDE_SPLIT_DURATION)
rightCodeTable.animate({ "left": @numberColumnOuterWidth, "width" :
@originalLeftWidth - @numberColumnOuterWidth }, @.SIDE_BY_SIDE_SPLIT_DURATION)
# expand left table to width of rest of the page
leftCodeTable.animate({ "width" : @originalLeftWidth }, @.SIDE_BY_SIDE_SPLIT_DURATION)
leftCodeTable.animate({ "width" : @originalLeftWidth}, @.SIDE_BY_SIDE_SPLIT_DURATION)

container.animate {"width": @.originalContainerWidth}, @.SIDE_BY_SIDE_SPLIT_DURATION, () =>
# after the side-by-side callapse animation is done,
# reset everything to the way it should be for unified diff
Expand Down

0 comments on commit c3f20c9

Please sign in to comment.