Remove view registry references from the workspace model layer

Removed various ::getView methods from the model. Using the atom.views
global in the views for now, but going to switch them over to using a
locally assigned view registry instead in a subsequent commit.
This commit is contained in:
Nathan Sobo
2014-11-30 14:47:51 -07:00
committed by Max Brunsfeld
parent b635fa0c97
commit 4591f00a65
19 changed files with 98 additions and 127 deletions

View File

@@ -14,7 +14,7 @@ class Panel
Section: Construction and Destruction
###
constructor: ({@viewRegistry, @item, @visible, @priority, @className}) ->
constructor: ({@item, @visible, @priority, @className}) ->
@emitter = new Emitter
@visible ?= true
@priority ?= 100
@@ -50,15 +50,8 @@ class Panel
Section: Panel Details
###
# Public: Gets this panel model's view DOM node.
#
# Returns an `<atom-panel>` {Element}
getView: -> @viewRegistry.getView(this)
# Public: Gets your panel contents view.
#
# Returns an {Element} or jQuery element, depeneding on how you created the panel.
getItemView: -> @viewRegistry.getView(@item)
# Public: Returns the panel's item.
getItem: -> @item
# Public: Returns a {Number} indicating this panel's priority.
getPriority: -> @priority