mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 10:17:11 +03:00
[Gutter] Rename 'HTML' to 'Node' in some methods
This commit is contained in:
parent
166f040077
commit
303cb4c368
@ -43,9 +43,9 @@ class CustomGutterComponent
|
||||
updatedDecorationIds.add(decorationId)
|
||||
existingDecoration = @decorationNodesById[decorationId]
|
||||
if existingDecoration
|
||||
@updateDecorationHTML(existingDecoration, decorationId, decorationInfo)
|
||||
@updateDecorationNode(existingDecoration, decorationId, decorationInfo)
|
||||
else
|
||||
newNode = @buildDecorationHTML(decorationId, decorationInfo)
|
||||
newNode = @buildDecorationNode(decorationId, decorationInfo)
|
||||
@decorationNodesById[decorationId] = newNode
|
||||
@decorationsNode.appendChild(newNode)
|
||||
|
||||
@ -61,7 +61,7 @@ class CustomGutterComponent
|
||||
###
|
||||
|
||||
# Builds and returns an HTMLElement to represent the specified decoration.
|
||||
buildDecorationHTML: (decorationId, decorationInfo) ->
|
||||
buildDecorationNode: (decorationId, decorationInfo) ->
|
||||
@oldDecorationPositionState[decorationId] = positionState = {};
|
||||
newNode = document.createElement('div')
|
||||
newNode.classList.add('decoration')
|
||||
@ -77,7 +77,7 @@ class CustomGutterComponent
|
||||
|
||||
# Updates the existing HTMLNode with the new decoration info. Attempts to
|
||||
# minimize changes to the DOM.
|
||||
updateDecorationHTML: (existingNode, decorationId, newDecorationInfo) ->
|
||||
updateDecorationNode: (existingNode, decorationId, newDecorationInfo) ->
|
||||
oldPositionState = @oldDecorationPositionState[decorationId];
|
||||
|
||||
if oldPositionState.top isnt newDecorationInfo.top + 'px'
|
||||
|
Loading…
Reference in New Issue
Block a user