mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
🎨
This commit is contained in:
@@ -8,7 +8,6 @@ class LineNumberGutterComponent extends TiledComponent
|
||||
dummyLineNumberNode: null
|
||||
|
||||
constructor: ({@onMouseDown, @editor, @gutter}) ->
|
||||
@lineNumberNodesById = {}
|
||||
@visible = true
|
||||
|
||||
@domNode = atom.views.getView(@gutter)
|
||||
@@ -55,9 +54,7 @@ class LineNumberGutterComponent extends TiledComponent
|
||||
if @newState.maxLineNumberDigits isnt @oldState.maxLineNumberDigits
|
||||
@updateDummyLineNumber()
|
||||
@oldState.styles = {}
|
||||
|
||||
afterUpdateSync: (state) ->
|
||||
@oldState.maxLineNumberDigits = @newState.maxLineNumberDigits
|
||||
@oldState.maxLineNumberDigits = @newState.maxLineNumberDigits
|
||||
|
||||
buildComponentForTile: (id) -> new LineNumbersTileComponent({id})
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ class LineNumbersTileComponent
|
||||
@domNode.classList.add("tile")
|
||||
@domNode.style.position = "absolute"
|
||||
@domNode.style.display = "block"
|
||||
@domNode.style.top = 0
|
||||
@domNode.style.top = 0 # Cover the space occupied by a dummy lineNumber
|
||||
|
||||
getDomNode: ->
|
||||
@domNode
|
||||
|
||||
@@ -46,17 +46,13 @@ class LinesComponent extends TiledComponent
|
||||
@placeholderTextDiv.textContent = @newState.placeholderText
|
||||
@domNode.appendChild(@placeholderTextDiv)
|
||||
|
||||
@removeTileNodes() unless @oldState.indentGuidesVisible is @newState.indentGuidesVisible
|
||||
@updateTileNodes()
|
||||
|
||||
if @newState.width isnt @oldState.width
|
||||
@domNode.style.width = @newState.width + 'px'
|
||||
@oldState.width = @newState.width
|
||||
|
||||
@cursorsComponent.updateSync(state)
|
||||
|
||||
@oldState.indentGuidesVisible = @newState.indentGuidesVisible
|
||||
@oldState.scrollWidth = @newState.scrollWidth
|
||||
@oldState.width = @newState.width
|
||||
|
||||
buildComponentForTile: (id) -> new LinesTileComponent({id, @presenter})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user