Set top and left position of root pane to 0 in adjustPaneDimensions

This commit is contained in:
Nathan Sobo 2012-04-13 15:27:15 -06:00
parent 7e3abe4ff3
commit 08b4a86f85
2 changed files with 4 additions and 2 deletions

View File

@ -89,7 +89,7 @@ describe "RootView", ->
expect(editor4.buffer.path).toBe require.resolve('fixtures/sample.txt')
expect(editor4.getCursorScreenPosition()).toEqual [0, 2]
# ensure adjustSplitPanes is called
# ensure adjust pane dimensions is called
expect(editor1.width()).toBeGreaterThan 0
expect(editor2.width()).toBeGreaterThan 0
expect(editor3.width()).toBeGreaterThan 0
@ -182,6 +182,7 @@ describe "RootView", ->
expect(rootView.panes.find('.row')).not.toExist()
expect(rootView.panes.find('.pane').length).toBe 1
expect(pane1.outerWidth()).toBe rootView.panes.width()
expect(pane1.position().left).toBe 0
describe "horizontal splits", ->
describe "when splitUp(view) is called on a pane", ->
@ -207,6 +208,7 @@ describe "RootView", ->
expect(rootView.panes.find('.column')).not.toExist()
expect(rootView.panes.find('.pane').length).toBe 1
expect(pane1.outerHeight()).toBe rootView.panes.height()
expect(pane1.position().top).toBe 0
describe "when splitDown(view) is called on a pane", ->
it "places a new pane below the current pane in a .column div", ->

View File

@ -102,7 +102,7 @@ class RootView extends View
adjustPaneDimensions: ->
rootPane = @panes.children().first().view()
rootPane?.css(width: '100%', height: '100%')
rootPane?.css(width: '100%', height: '100%', top: 0, left: 0)
rootPane?.adjustDimensions()
toggleFileFinder: ->