Skip to content

Commit

Permalink
[Toolbar] Reset right and left .sf-toolbar-info values needed for win…
Browse files Browse the repository at this point in the history
…dow resize
  • Loading branch information
Stefano Sala committed Jan 20, 2015
1 parent 23c0ddc commit caf4506
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -42,6 +42,10 @@
var leftValue = (elementWidth + this.offsetLeft) - pageWidth;
var rightValue = (elementWidth + (pageWidth - this.offsetLeft)) - pageWidth;
// Reset right and left value, useful on window resize
toolbarInfo.style.right = '';
toolbarInfo.style.left = '';
if (leftValue > 0 && rightValue > 0) {
toolbarInfo.style.right = (rightValue * -1) + 'px';
} else if (leftValue < 0) {
Expand Down

0 comments on commit caf4506

Please sign in to comment.