[Toolbar] Reset right and left .sf-toolbar-info values needed for window resize

This commit is contained in:
Stefano Sala 2015-01-20 21:57:47 +01:00
parent 23c0ddca39
commit 838857c992
1 changed files with 4 additions and 0 deletions

View File

@ -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) {