Skip to content

Commit

Permalink
Extract dot markers size and spacing read in instance methods
Browse files Browse the repository at this point in the history
  • Loading branch information
abe33 committed Jul 31, 2014
1 parent 064738b commit d748941
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/dot-marker-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class DotMarkerView

@hide() if @hidden()

size = atom.config.get('atom-color-highlight.dotMarkersSize')
spacing = atom.config.get('atom-color-highlight.dotMarkersSpacing')
size = @getSize()
spacing = @getSpacing()
@markersByRows[range.start.row] ?= 0
@position ?= @markersByRows[range.start.row]
@markersByRows[range.start.row]++
Expand All @@ -45,3 +45,6 @@ class DotMarkerView
@element.style.left = (left + spacing + @position * (size + spacing)) + 'px'
@element.style.backgroundColor = color
@element.style.color = colorText

getSize: -> atom.config.get('atom-color-highlight.dotMarkersSize')
getSpacing: -> atom.config.get('atom-color-highlight.dotMarkersSpacing')

0 comments on commit d748941

Please sign in to comment.