Merge pull request #36 from zenozeng/master

Use prop('scrollWidth') and prop('scrollHeight') instead of outerWidth() and outerHeight() to get the content size.
This commit is contained in:
Hyunje Alex Jun 2013-06-14 05:32:44 -07:00
commit a8db04e41d

View File

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