Fix 0-width cursors in presenter instead of view

This commit is contained in:
Nathan Sobo
2015-01-23 08:19:01 -07:00
parent 4ed07bb66d
commit 06b5eba17c
5 changed files with 11 additions and 7 deletions

View File

@@ -7,9 +7,8 @@ CursorComponent = React.createClass
displayName: 'CursorComponent'
render: ->
{pixelRect, defaultCharWidth} = @props
{pixelRect} = @props
{top, left, height, width} = pixelRect
width = defaultCharWidth if width is 0
WebkitTransform = "translate(#{left}px, #{top}px)"
div className: 'cursor', style: {height, width, WebkitTransform}