Separate the function updating the css of scrollbars.
This commit is contained in:
parent
e833f42d02
commit
21d5d4ab63
@ -66,6 +66,11 @@
|
|||||||
$scrollbarY.css({right: scrollbarYRight - scrollLeft});
|
$scrollbarY.css({right: scrollbarYRight - scrollLeft});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var updateScrollbarCss = function () {
|
||||||
|
$scrollbarX.css({left: scrollbarXLeft + $this.scrollLeft(), bottom: scrollbarXBottom - $this.scrollTop(), width: scrollbarXWidth});
|
||||||
|
$scrollbarY.css({top: scrollbarYTop + $this.scrollTop(), right: scrollbarYRight - $this.scrollLeft(), height: scrollbarYHeight});
|
||||||
|
};
|
||||||
|
|
||||||
var updateBarSizeAndPosition = function () {
|
var updateBarSizeAndPosition = function () {
|
||||||
containerWidth = $this.width();
|
containerWidth = $this.width();
|
||||||
containerHeight = $this.height();
|
containerHeight = $this.height();
|
||||||
@ -97,8 +102,7 @@
|
|||||||
scrollbarXLeft = containerWidth - scrollbarXWidth;
|
scrollbarXLeft = containerWidth - scrollbarXWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
$scrollbarX.css({left: scrollbarXLeft + $this.scrollLeft(), bottom: scrollbarXBottom - $this.scrollTop(), width: scrollbarXWidth});
|
updateScrollbarCss();
|
||||||
$scrollbarY.css({top: scrollbarYTop + $this.scrollTop(), right: scrollbarYRight - $this.scrollLeft(), height: scrollbarYHeight});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var moveBarX = function (currentLeft, deltaX) {
|
var moveBarX = function (currentLeft, deltaX) {
|
||||||
|
Loading…
Reference in New Issue
Block a user