mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-14 04:29:04 +03:00
Set top and left position of root pane to 0 in adjustPaneDimensions
This commit is contained in:
parent
7e3abe4ff3
commit
08b4a86f85
@ -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", ->
|
||||
|
@ -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: ->
|
||||
|
Loading…
Reference in New Issue
Block a user