mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
add getter for editorLineHeight
This commit is contained in:
@@ -745,15 +745,25 @@ class EditorView extends View
|
||||
|
||||
@redraw()
|
||||
|
||||
setEditorLineHeight: (editorLineHeight) ->
|
||||
@css('line-height', editorLineHeight)
|
||||
@redraw()
|
||||
|
||||
# Public: Gets the font family for the editor.
|
||||
#
|
||||
# Returns a {String} identifying the CSS `font-family`.
|
||||
getFontFamily: -> @css("font-family")
|
||||
|
||||
# Public: Sets the line height of the editor
|
||||
#
|
||||
# editorLineHeight - A {Number} without a unit suffix identifying the CSS
|
||||
# `line-height`.
|
||||
setEditorLineHeight: (editorLineHeight) ->
|
||||
@css('line-height', editorLineHeight)
|
||||
@redraw()
|
||||
|
||||
# Public: Gets the line height for the editor
|
||||
#
|
||||
# Returns a {Float} identifying the CSS line-height.
|
||||
getLineHeight: ->
|
||||
parseFloat(@css('line-height'))
|
||||
|
||||
# Public: Redraw the editor
|
||||
redraw: ->
|
||||
return unless @hasParent()
|
||||
|
||||
Reference in New Issue
Block a user