Store useShadowDOM setting when TextEditorElement is created

Rather than reading it repeatedly, since the value could potentially
change over time.
This commit is contained in:
Nathan Sobo
2014-11-12 14:40:09 -07:00
committed by Ben Ogle
parent 263ff21cc1
commit 08971562cd
3 changed files with 10 additions and 5 deletions

View File

@@ -50,7 +50,7 @@ TextEditorComponent = React.createClass
render: ->
{focused, showIndentGuide, showLineNumbers, visible} = @state
{editor, mini, cursorBlinkPeriod, cursorBlinkResumeDelay, hostElement} = @props
{editor, mini, cursorBlinkPeriod, cursorBlinkResumeDelay, hostElement, useShadowDOM} = @props
maxLineNumberDigits = editor.getLineCount().toString().length
hasSelection = editor.getLastSelection()? and !editor.getLastSelection().isEmpty()
style = {}
@@ -117,7 +117,7 @@ TextEditorComponent = React.createClass
@scrollingVertically, scrollHeight, scrollWidth, mouseWheelScreenRow,
visible, scrollViewHeight, @scopedCharacterWidthsChangeCount, lineWidth, @useHardwareAcceleration,
placeholderText, @performedInitialMeasurement, @backgroundColor, cursorPixelRects,
cursorBlinkPeriod, cursorBlinkResumeDelay, mini
cursorBlinkPeriod, cursorBlinkResumeDelay, mini, useShadowDOM
}
ScrollbarComponent