mirror of
https://github.com/atom/atom.git
synced 2026-02-06 12:44:59 -05:00
Merge remote-tracking branch 'origin/master' into cj-add-react-editor-shims
Conflicts: src/editor-component.coffee
This commit is contained in:
@@ -173,6 +173,7 @@ EditorComponent = React.createClass
|
||||
componentDidUpdate: (prevProps, prevState) ->
|
||||
@pendingChanges.length = 0
|
||||
@refreshingScrollbars = false
|
||||
@updateParentViewFocusedClassIfNeeded(prevState)
|
||||
@measureScrollbars() if @measuringScrollbars
|
||||
@measureLineHeightAndCharWidthsIfNeeded(prevState)
|
||||
@pauseOverflowChangedEvents()
|
||||
@@ -769,6 +770,10 @@ EditorComponent = React.createClass
|
||||
|
||||
setInputEnabled: (@inputEnabled) -> @inputEnabled
|
||||
|
||||
updateParentViewFocusedClassIfNeeded: (prevState) ->
|
||||
if prevState.focused isnt @state.focused
|
||||
@props.parentView.toggleClass('is-focused', @props.focused)
|
||||
|
||||
runScrollBenchmark: ->
|
||||
unless process.env.NODE_ENV is 'production'
|
||||
ReactPerf = require 'react-atom-fork/lib/ReactDefaultPerf'
|
||||
|
||||
@@ -17,7 +17,7 @@ GutterComponent = React.createClass
|
||||
{scrollHeight, scrollTop} = @props
|
||||
|
||||
div className: 'gutter', onClick: @onClick,
|
||||
div className: 'line-numbers', ref: 'lineNumbers', style:
|
||||
div className: 'line-numbers editor-colors', ref: 'lineNumbers', style:
|
||||
height: scrollHeight
|
||||
WebkitTransform: "translate3d(0px, #{-scrollTop}px, 0px)"
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ LinesComponent = React.createClass
|
||||
width: scrollWidth
|
||||
WebkitTransform: "translate3d(#{-scrollLeft}px, #{-scrollTop}px, 0px)"
|
||||
|
||||
div {className: 'lines', style},
|
||||
div {className: 'lines editor-colors', style},
|
||||
SelectionsComponent({editor, selectionScreenRanges, lineHeightInPixels, defaultCharWidth}) if @isMounted()
|
||||
|
||||
componentWillMount: ->
|
||||
|
||||
Reference in New Issue
Block a user