mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
This fork of React allows data-react-skip-selection-restoration to be defined on input elements, skipping costly selection restoration that occurs when the input element is focused during reconciliation.
16 lines
451 B
CoffeeScript
16 lines
451 B
CoffeeScript
React = require 'react-atom-fork'
|
|
{div} = require 'reactionary-atom-fork'
|
|
|
|
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}
|