Skip to content

Commit

Permalink
Fix confusion setting vs.display.
Browse files Browse the repository at this point in the history
  • Loading branch information
jayfoad committed Mar 15, 2017
1 parent d489071 commit c7a95f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/scrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ CM.scrollbarModel.simple=function(place,scroll){
if(!width){var style=window.getComputedStyle?window.getComputedStyle(h.node):h.node.currentStyle
if(style)width=parseInt(style.height)}
var w=width||0,vs=v.node.style,hs=h.node.style
var hb=m.scrollWidth >m.clientWidth +1;vs.display=vb?'':'none' //hb:needs horizontal bar?
var vb=m.scrollHeight>m.clientHeight+1;hs.display=hb?'':'none' //vb:needs vertical bar?
if(vb){v.update(m.scrollHeight,m.clientHeight,m.viewHeight-(hb?w:0),w);vs.display='';vs.bottom=hb?w+'px':'0'}
var hb=m.scrollWidth >m.clientWidth +1;hs.display=hb?'':'none' //hb:needs horizontal bar?
var vb=m.scrollHeight>m.clientHeight+1;vs.display=vb?'':'none' //vb:needs vertical bar?
if(vb){v.update(m.scrollHeight,m.clientHeight,m.viewHeight-(hb?w:0),w);vs.bottom=hb?w+'px':'0'}
if(hb){h.update(m.scrollWidth,m.clientWidth,m.viewWidth-(vb?w:0)-m.barLeft,w);hs.right=vb?w+'px':'0';hs.left=m.barLeft+'px'}
return{right:vb?w:0,bottom:hb?w:0}
}
Expand Down

0 comments on commit c7a95f4

Please sign in to comment.