mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
Honor editor's scrollSensitivity parameter
This commit is contained in:
@@ -1486,7 +1486,7 @@ class TextEditorComponent {
|
||||
}
|
||||
|
||||
didMouseWheel (event) {
|
||||
const scrollSensitivity = this.props.mouseWheelScrollSensitivity || 0.8
|
||||
const scrollSensitivity = this.props.model.getScrollSensitivity() / 100
|
||||
|
||||
let {deltaX, deltaY} = event
|
||||
deltaX = deltaX * scrollSensitivity
|
||||
|
||||
@@ -98,7 +98,6 @@ class TextEditor extends Model
|
||||
registered: false
|
||||
atomicSoftTabs: true
|
||||
invisibles: null
|
||||
scrollSensitivity: 40
|
||||
|
||||
Object.defineProperty @prototype, "element",
|
||||
get: -> @getElement()
|
||||
@@ -156,7 +155,7 @@ class TextEditor extends Model
|
||||
@softTabs, @initialScrollTopRow, @initialScrollLeftColumn, initialLine, initialColumn, tabLength,
|
||||
@softWrapped, @decorationManager, @selectionsMarkerLayer, @buffer, suppressCursorCreation,
|
||||
@mini, @placeholderText, lineNumberGutterVisible, @showLineNumbers, @largeFileMode,
|
||||
@assert, grammar, @showInvisibles, @autoHeight, @autoWidth, @scrollPastEnd, @editorWidthInChars,
|
||||
@assert, grammar, @showInvisibles, @autoHeight, @autoWidth, @scrollPastEnd, @scrollSensitivity, @editorWidthInChars,
|
||||
@tokenizedBuffer, @displayLayer, @invisibles, @showIndentGuide,
|
||||
@softWrapped, @softWrapAtPreferredLineLength, @preferredLineLength,
|
||||
@showCursorOnSelection
|
||||
@@ -172,6 +171,7 @@ class TextEditor extends Model
|
||||
|
||||
@mini ?= false
|
||||
@scrollPastEnd ?= false
|
||||
@scrollSensitivity ?= 40
|
||||
@showInvisibles ?= true
|
||||
@softTabs ?= true
|
||||
tabLength ?= 2
|
||||
|
||||
Reference in New Issue
Block a user