Don't show the gutter when 'mini' is true on React editors

This commit is contained in:
Nathan Sobo
2014-07-13 13:06:37 -06:00
parent 4020ed1535
commit cc8b7b13b3
2 changed files with 9 additions and 2 deletions

View File

@@ -50,7 +50,7 @@ EditorComponent = React.createClass
render: ->
{focused, fontSize, lineHeight, fontFamily, showIndentGuide, showInvisibles, showLineNumbers, visible} = @state
{editor, cursorBlinkPeriod, cursorBlinkResumeDelay} = @props
{editor, mini, cursorBlinkPeriod, cursorBlinkResumeDelay} = @props
maxLineNumberDigits = editor.getLineCount().toString().length
invisibles = if showInvisibles then @state.invisibles else {}
hasSelection = editor.getSelection()? and !editor.getSelection().isEmpty()
@@ -86,7 +86,7 @@ EditorComponent = React.createClass
className += ' has-selection' if hasSelection
div className: className, style: {fontSize, lineHeight, fontFamily}, tabIndex: -1,
if showLineNumbers
if not mini and showLineNumbers
GutterComponent {
ref: 'gutter', onMouseDown: @onGutterMouseDown, onWidthChanged: @onGutterWidthChanged,
lineDecorations, defaultCharWidth, editor, renderedRowRange, maxLineNumberDigits, scrollViewHeight,