Fix specs

This commit is contained in:
Ben Ogle 2014-09-24 16:24:26 -07:00
parent af1bdaf901
commit 832b4ae4d8
2 changed files with 7 additions and 7 deletions

View File

@ -1734,11 +1734,11 @@ describe "TextEditorComponent", ->
nextAnimationFrame() nextAnimationFrame()
expect(verticalScrollbarNode.scrollTop).toBe 10 expect(verticalScrollbarNode.scrollTop).toBe 10
it "parses negative scrollSensitivity values as positive", -> it "parses negative scrollSensitivity values at the minimum", ->
atom.config.set('editor.scrollSensitivity', -50) atom.config.set('editor.scrollSensitivity', -50)
componentNode.dispatchEvent(new WheelEvent('mousewheel', wheelDeltaX: 0, wheelDeltaY: -10)) componentNode.dispatchEvent(new WheelEvent('mousewheel', wheelDeltaX: 0, wheelDeltaY: -10))
nextAnimationFrame() nextAnimationFrame()
expect(verticalScrollbarNode.scrollTop).toBe 5 expect(verticalScrollbarNode.scrollTop).toBe 1
describe "when the mousewheel event's target is a line", -> describe "when the mousewheel event's target is a line", ->
it "keeps the line on the DOM if it is scrolled off-screen", -> it "keeps the line on the DOM if it is scrolled off-screen", ->

View File

@ -113,7 +113,7 @@ class EditorView extends View
scrollSensitivity: scrollSensitivity:
type: 'integer' type: 'integer'
default: 40 default: 40
minimum: 1 minimum: 10
maximum: 200 maximum: 200
useHardwareAcceleration: useHardwareAcceleration:
type: 'boolean' type: 'boolean'
@ -128,16 +128,16 @@ class EditorView extends View
type: 'object' type: 'object'
properties: properties:
eol: eol:
type: 'string' type: ['string', 'boolean']
default: '\u00ac' default: '\u00ac'
space: space:
type: 'string' type: ['string', 'boolean']
default: '\u00b7' default: '\u00b7'
tab: tab:
type: 'string' type: ['string', 'boolean']
default: '\u00bb' default: '\u00bb'
cr: cr:
type: 'string' type: ['string', 'boolean']
default: '\u00a4' default: '\u00a4'
>>>>>>> Editor config uses a schema:src/editor-view.coffee >>>>>>> Editor config uses a schema:src/editor-view.coffee