mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Merge branch 'master' into api/docs
This commit is contained in:
@@ -354,31 +354,3 @@ describe "RootView", ->
|
||||
rootView.open(require.resolve('fixtures/sample.txt'))
|
||||
expect(count).toBe 1
|
||||
expect(callbackBuffer).toBe rootView.getActiveView().getBuffer()
|
||||
|
||||
describe ".eachPane(callback)", ->
|
||||
beforeEach ->
|
||||
rootView.attachToDom()
|
||||
|
||||
it "invokes the callback for all existing panes", ->
|
||||
count = 0
|
||||
callbackPane = null
|
||||
callback = (pane) ->
|
||||
callbackPane = pane
|
||||
count++
|
||||
rootView.eachPane(callback)
|
||||
expect(count).toBe 1
|
||||
expect(callbackPane).toBe rootView.getActivePane()
|
||||
|
||||
it "invokes the callback for new panes", ->
|
||||
count = 0
|
||||
callbackPane = null
|
||||
callback = (pane) ->
|
||||
callbackPane = pane
|
||||
count++
|
||||
|
||||
rootView.eachPane(callback)
|
||||
count = 0
|
||||
callbackPane = null
|
||||
rootView.getActiveView().splitRight()
|
||||
expect(count).toBe 1
|
||||
expect(callbackPane).toBe rootView.getActivePane()
|
||||
|
||||
@@ -162,10 +162,6 @@ class RootView extends View
|
||||
indexOfPane: (pane) ->
|
||||
@panes.indexOfPane(pane)
|
||||
|
||||
eachPane: (callback) ->
|
||||
callback(pane) for pane in @getPanes()
|
||||
@on 'pane:attached', (e, pane) -> callback(pane)
|
||||
|
||||
eachEditor: (callback) ->
|
||||
callback(editor) for editor in @getEditors()
|
||||
@on 'editor:attached', (e, editor) -> callback(editor)
|
||||
|
||||
@@ -6,7 +6,7 @@ TabView = require './tab-view'
|
||||
module.exports =
|
||||
class TabBarView extends View
|
||||
@content: ->
|
||||
@ul class: "tabs sortable-list"
|
||||
@ul tabindex: -1, class: "tabs sortable-list"
|
||||
|
||||
initialize: (@pane) ->
|
||||
@on 'dragstart', '.sortable', @onDragStart
|
||||
|
||||
@@ -301,4 +301,3 @@ describe "TabBarView", ->
|
||||
|
||||
expect(dragStartEvent.originalEvent.dataTransfer.getData("text/plain")).toEqual editSession1.getPath()
|
||||
expect(dragStartEvent.originalEvent.dataTransfer.getData("text/uri-list")).toEqual 'file://' + editSession1.getPath()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user