use scrollHeight & scrollWidth to avoid getting the wrong size of the content
This commit is contained in:
parent
de6e4d59b0
commit
d14dfd307e
@ -70,8 +70,8 @@
|
||||
var updateBarSizeAndPosition = function () {
|
||||
containerWidth = $this.width();
|
||||
containerHeight = $this.height();
|
||||
contentWidth = $content.outerWidth(false);
|
||||
contentHeight = $content.outerHeight(false);
|
||||
contentWidth = $this.prop('scrollWidth');
|
||||
contentHeight = $this.prop('scrollHeight');
|
||||
if (containerWidth < contentWidth) {
|
||||
scrollbarXWidth = parseInt(containerWidth * containerWidth / contentWidth, 10);
|
||||
scrollbarXLeft = parseInt($this.scrollLeft() * containerWidth / contentWidth, 10);
|
||||
|
Loading…
Reference in New Issue
Block a user