Permalink
Browse files

border radius compat fix

  • Loading branch information...
Jonathan Azoff
Jonathan Azoff committed Dec 25, 2011
1 parent 18e5234 commit 8434879d35c7864d07abc966d779e5fa545cf050
Showing with 14 additions and 15 deletions.
  1. +1 −1 demo.html
  2. +10 −11 jquery.overscroll.js
  3. +3 −3 jquery.overscroll.min.js
View
@@ -230,7 +230,7 @@ <h1>jQuery.overscroll</h1>
o = $("#overscroll").overscroll({
cancelOn: '.no-drag',
//hoverThumbs: true,
- // persistThumbs: true,
+ persistThumbs: true,
//showThumbs: false,
scrollLeft: 200,
scrollTop: 100
View
@@ -126,12 +126,12 @@
if (thumbs.horizontal) {
ml = left * (1 + sizing.container.width / sizing.container.scrollWidth);
mt = top + sizing.thumbs.horizontal.top;
- thumbs.horizontal.css("margin", mt + "px 0 0 " + ml + "px");
+ thumbs.horizontal.css('margin', mt + 'px 0 0 ' + ml + 'px');
}
if (thumbs.vertical) {
ml = left + sizing.thumbs.vertical.left;
mt = top * (1 + sizing.container.height / sizing.container.scrollHeight);
- thumbs.vertical.css("margin", mt + "px 0 0 " + ml + "px");
+ thumbs.vertical.css('margin', mt + 'px 0 0 ' + ml + 'px');
}
}
@@ -521,17 +521,16 @@
// Genterates CSS specific to a particular thumb.
// It requires sizing data and options
getThumbCss = function(size, options) {
- var css = {
- position: "absolute",
+ return {
+ position: 'absolute',
opacity: options.persistThumbs ? settings.thumbOpacity : 0,
- "background-color": "black",
- width: size.width + "px",
- height: size.height + "px",
- "margin": size.top + "px 0 0 " + size.left + "px",
- "z-index": options.zIndex
+ 'background-color': 'black',
+ width: size.width + 'px',
+ height: size.height + 'px',
+ 'border-radius': size.corner + 'px',
+ 'margin': size.top + 'px 0 0 ' + size.left + 'px',
+ 'z-index': options.zIndex
};
- css[prefix + 'border-radius'] = size.corner + "px";
- return css;
},
// Creates the DOM elements used as "thumbs" within
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 8434879

Please sign in to comment.