mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Now that they're on their own layer, I don't think it affects the repaint timing when typing on lines (if it ever did).
16 lines
431 B
CoffeeScript
16 lines
431 B
CoffeeScript
React = require 'react'
|
|
{div} = require 'reactionary'
|
|
|
|
module.exports =
|
|
CursorComponent = React.createClass
|
|
displayName: 'CursorComponent'
|
|
|
|
render: ->
|
|
{cursor, scrollTop, scrollLeft} = @props
|
|
{top, left, height, width} = cursor.getPixelRect()
|
|
top -= scrollTop
|
|
left -= scrollLeft
|
|
WebkitTransform = "translate3d(#{left}px, #{top}px, 0px)"
|
|
|
|
div className: 'cursor', style: {height, width, WebkitTransform}
|