mirror of
https://github.com/atom/atom.git
synced 2026-01-26 07:19:06 -05:00
This allows us to use the presenter for all stages of the component lifecycle rather than needing to wait until it is created. Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
21 lines
648 B
CoffeeScript
21 lines
648 B
CoffeeScript
React = require 'react-atom-fork'
|
|
{div} = require 'reactionary-atom-fork'
|
|
{debounce, toArray, isEqualForProperties, isEqual} = require 'underscore-plus'
|
|
SubscriberMixin = require './subscriber-mixin'
|
|
CursorComponent = require './cursor-component'
|
|
|
|
module.exports =
|
|
CursorsComponent = React.createClass
|
|
displayName: 'CursorsComponent'
|
|
|
|
render: ->
|
|
{presenter} = @props
|
|
|
|
className = 'cursors'
|
|
className += ' blink-off' if presenter.state.content.blinkCursorsOff
|
|
|
|
div {className},
|
|
if presenter.hasRequiredMeasurements()
|
|
for key, pixelRect of presenter.state.content.cursors
|
|
CursorComponent({key, pixelRect})
|