Manually config tileSize

Dealing with a manually entered `tileSize` is actually easier to reason about,
therefore we no longer calculate it based on `tileCount.`
This commit is contained in:
Antonio Scandurra
2015-05-20 18:55:47 +02:00
parent 329b5b4e02
commit 752dbf2c6e
7 changed files with 39 additions and 38 deletions

View File

@@ -18,7 +18,7 @@ class TextEditorComponent
scrollSensitivity: 0.4
cursorBlinkPeriod: 800
cursorBlinkResumeDelay: 100
lineOverdrawMargin: 15
tileSize: 12
pendingScrollTop: null
pendingScrollLeft: null
@@ -36,8 +36,8 @@ class TextEditorComponent
gutterComponent: null
mounted: true
constructor: ({@editor, @hostElement, @rootElement, @stylesElement, @useShadowDOM, lineOverdrawMargin}) ->
@lineOverdrawMargin = lineOverdrawMargin if lineOverdrawMargin?
constructor: ({@editor, @hostElement, @rootElement, @stylesElement, @useShadowDOM, tileSize}) ->
@tileSize = tileSize if tileSize?
@disposables = new CompositeDisposable
@observeConfig()
@@ -47,7 +47,7 @@ class TextEditorComponent
model: @editor
scrollTop: @editor.getScrollTop()
scrollLeft: @editor.getScrollLeft()
lineOverdrawMargin: lineOverdrawMargin
tileSize: tileSize
cursorBlinkPeriod: @cursorBlinkPeriod
cursorBlinkResumeDelay: @cursorBlinkResumeDelay
stoppedScrollingDelay: 200