[Toolbar] Reset right and left .sf-toolbar-info values needed for window resize
This commit is contained in:
parent
23c0ddca39
commit
838857c992
@ -42,6 +42,10 @@
|
|||||||
var leftValue = (elementWidth + this.offsetLeft) - pageWidth;
|
var leftValue = (elementWidth + this.offsetLeft) - pageWidth;
|
||||||
var rightValue = (elementWidth + (pageWidth - 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) {
|
if (leftValue > 0 && rightValue > 0) {
|
||||||
toolbarInfo.style.right = (rightValue * -1) + 'px';
|
toolbarInfo.style.right = (rightValue * -1) + 'px';
|
||||||
} else if (leftValue < 0) {
|
} else if (leftValue < 0) {
|
||||||
|
Reference in New Issue
Block a user