Explicitly assign dummy scrollbars to the correct width/height

Previously, dummy scrollbars were always 15px wide/tall. This caused
them to obscure the ability to click for the entire 15px region, even if
the actual scrollbar was styled to be much thinner. Now we explicitly
measure the size of scrollbars on mount and when the stylesheets change
and set the height/width explicitly.
This commit is contained in:
Nathan Sobo
2014-05-02 12:32:03 -07:00
parent e1b4b921ba
commit bdd605e85b
4 changed files with 53 additions and 4 deletions

View File

@@ -4,7 +4,12 @@ React = require 'react'
module.exports =
ScrollbarComponent = React.createClass
render: ->
{visible, width, height} = @props
{visible, measuringScrollbars, width, height} = @props
if measuringScrollbars
height = 25
width = 25
display = 'none' unless visible
div className: 'scrollbar-corner', style: {display, width, height},