Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
902006e110 |
1 changed files with 6 additions and 12 deletions
|
|
@ -64,8 +64,6 @@ var ScrollBarV = function(parent, renderer) {
|
|||
// make element a little bit wider to retain scrollbar when page is zoomed
|
||||
renderer.$scrollbarWidth =
|
||||
this.width = dom.scrollbarWidth(parent.ownerDocument);
|
||||
renderer.$scrollbarWidth =
|
||||
this.width = dom.scrollbarWidth(parent.ownerDocument);
|
||||
this.fullWidth = this.width;
|
||||
this.inner.style.width =
|
||||
this.element.style.width = (this.width || 15) + 5 + "px";
|
||||
|
|
@ -85,12 +83,7 @@ var ScrollBarH = function(parent, renderer) {
|
|||
this.element.appendChild(this.inner);
|
||||
|
||||
parent.appendChild(this.element);
|
||||
|
||||
// in OSX lion the scrollbars appear to have no width. In this case resize the
|
||||
// element to show the scrollbar but still pretend that the scrollbar has a width
|
||||
// of 0px
|
||||
// in Firefox 6+ scrollbar is hidden if element has the same width as scrollbar
|
||||
// make element a little bit wider to retain scrollbar when page is zoomed
|
||||
|
||||
this.height = renderer.$scrollbarWidth;
|
||||
this.fullHeight = this.height;
|
||||
this.inner.style.height =
|
||||
|
|
@ -181,17 +174,18 @@ var ScrollBarH = function(parent, renderer) {
|
|||
// on chrome 17+ for small zoom levels after calling this function
|
||||
// this.element.scrollTop != scrollTop which makes page to scroll up.
|
||||
this.setScrollTop = function(scrollTop) {
|
||||
if (this.scrollTop != scrollTop) {
|
||||
if (Math.abs(this.scrollTop - scrollTop) > 1) {
|
||||
this.skipEvent = true;
|
||||
this.scrollTop = this.element.scrollTop = scrollTop;
|
||||
this.scrollTop = this.element.scrollTop = Math.round(scrollTop);
|
||||
}
|
||||
};
|
||||
this.setScrollLeft = function(scrollLeft) {
|
||||
if (this.scrollLeft != scrollLeft) {
|
||||
if (Math.abs(this.scrollLeft - scrollLeft) > 1) {
|
||||
this.skipEvent = true;
|
||||
this.scrollLeft = this.element.scrollLeft = scrollLeft;
|
||||
this.scrollLeft = this.element.scrollLeft = Math.round(scrollLeft);
|
||||
}
|
||||
};
|
||||
this.scrollTop = this.scrollLeft = 0;
|
||||
|
||||
}).call(ScrollBarV.prototype);
|
||||
ScrollBarH.prototype = ScrollBarV.prototype;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue