mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
[Gutter][View Registry] Add Gutter view providers to the ViewRegistry
This commit is contained in:
@@ -1,6 +1,18 @@
|
||||
# Helper methods shared among GutterComponent classes.
|
||||
|
||||
module.exports =
|
||||
createGutterView: (gutterModel) ->
|
||||
domNode = document.createElement('div')
|
||||
domNode.classList.add('gutter')
|
||||
domNode.setAttribute('gutter-name', gutterModel.name)
|
||||
childNode = document.createElement('div')
|
||||
if gutterModel.name is 'line-number'
|
||||
childNode.classList.add('line-numbers')
|
||||
else
|
||||
childNode.classList.add('custom-decorations')
|
||||
domNode.appendChild(childNode)
|
||||
domNode
|
||||
|
||||
# Sets scrollHeight, scrollTop, and backgroundColor on the given domNode.
|
||||
setDimensionsAndBackground: (oldState, newState, domNode) ->
|
||||
if newState.scrollHeight isnt oldState.scrollHeight
|
||||
|
||||
Reference in New Issue
Block a user