Prevent scrollbar x from moving out of the container.
This commit is contained in:
parent
9734a18d01
commit
4012ce9c8c
@ -93,6 +93,9 @@
|
|||||||
if(scrollbar_y_top >= container_height - scrollbar_y_height) {
|
if(scrollbar_y_top >= container_height - scrollbar_y_height) {
|
||||||
scrollbar_y_top = container_height - scrollbar_y_height;
|
scrollbar_y_top = container_height - scrollbar_y_height;
|
||||||
}
|
}
|
||||||
|
if(scrollbar_x_left >= container_width - scrollbar_x_width) {
|
||||||
|
scrollbar_x_left = container_width - scrollbar_x_width;
|
||||||
|
}
|
||||||
|
|
||||||
$scrollbar_x.css({left: scrollbar_x_left + $this.scrollLeft(), bottom: scrollbar_x_bottom - $this.scrollTop(), width: scrollbar_x_width});
|
$scrollbar_x.css({left: scrollbar_x_left + $this.scrollLeft(), bottom: scrollbar_x_bottom - $this.scrollTop(), width: scrollbar_x_width});
|
||||||
$scrollbar_y.css({top: scrollbar_y_top + $this.scrollTop(), right: scrollbar_y_right - $this.scrollLeft(), height: scrollbar_y_height});
|
$scrollbar_y.css({top: scrollbar_y_top + $this.scrollTop(), right: scrollbar_y_right - $this.scrollLeft(), height: scrollbar_y_height});
|
||||||
|
Loading…
Reference in New Issue
Block a user