💚 Fix some TextEditorComponent specs

This commit is contained in:
Antonio Scandurra
2015-09-23 16:25:50 +02:00
parent 0f7d88c77b
commit 87c7a0ae30
4 changed files with 27 additions and 9 deletions

View File

@@ -388,6 +388,12 @@ class TextEditorComponent
getScrollWidth: ->
@presenter.getScrollWidth()
getVerticalScrollbarWidth: ->
@presenter.getVerticalScrollbarWidth()
getHorizontalScrollbarHeight: ->
@presenter.getHorizontalScrollbarHeight()
onMouseDown: (event) =>
unless event.button is 0 or (event.button is 1 and process.platform is 'linux')
# Only handle mouse down events for left mouse button on all platforms

View File

@@ -258,6 +258,12 @@ class TextEditorElement extends HTMLElement
getScrollWidth: ->
@component.getScrollWidth()
getVerticalScrollbarWidth: ->
@component.getVerticalScrollbarWidth()
getHorizontalScrollbarHeight: ->
@component.getHorizontalScrollbarHeight()
stopEventPropagation = (commandListeners) ->
newCommandListeners = {}
for commandName, commandListener of commandListeners

View File

@@ -1486,6 +1486,12 @@ class TextEditorPresenter
getHorizontalScrollMarginInPixels: ->
@model.getHorizontalScrollMargin() * @baseCharacterWidth
getVerticalScrollbarWidth: ->
@verticalScrollbarWidth
getHorizontalScrollbarHeight: ->
@horizontalScrollbarHeight
commitPendingLogicalScrollPosition: ->
{screenRange, options} = @pendingScrollLogicalPosition