mirror of
https://github.com/atom/atom.git
synced 2026-02-12 23:55:10 -05:00
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:
committed by
Max Brunsfeld
parent
b635fa0c97
commit
4591f00a65
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user