mirror of
https://github.com/atom/atom.git
synced 2026-02-09 14:15:24 -05:00
Remove ‘group’ parameter to addStyleSheet in favor of ‘priority’
This commit is contained in:
@@ -92,12 +92,7 @@ class StyleManager
|
||||
addStyleSheet: (source, params) ->
|
||||
sourcePath = params?.sourcePath
|
||||
context = params?.context
|
||||
group = params?.group
|
||||
priority = params?.priority ?
|
||||
switch group
|
||||
when 'bundled' then 0
|
||||
when 'theme' then 1
|
||||
when 'user' then 2
|
||||
priority = params?.priority
|
||||
|
||||
if sourcePath? and styleElement = @styleElementsBySourcePath[sourcePath]
|
||||
updated = true
|
||||
@@ -111,10 +106,6 @@ class StyleManager
|
||||
styleElement.context = context
|
||||
styleElement.setAttribute('context', context)
|
||||
|
||||
if group?
|
||||
styleElement.group = group
|
||||
styleElement.setAttribute('group', group)
|
||||
|
||||
if priority?
|
||||
styleElement.priority = priority
|
||||
styleElement.setAttribute('priority', priority)
|
||||
@@ -129,14 +120,7 @@ class StyleManager
|
||||
new Disposable => @removeStyleElement(styleElement)
|
||||
|
||||
addStyleElement: (styleElement) ->
|
||||
{sourcePath, group, priority} = styleElement
|
||||
|
||||
if group?
|
||||
for existingElement, index in @styleElements
|
||||
if existingElement.group is group
|
||||
insertIndex = index + 1
|
||||
else
|
||||
break if insertIndex?
|
||||
{sourcePath, priority} = styleElement
|
||||
|
||||
if priority?
|
||||
for existingElement, index in @styleElements
|
||||
|
||||
Reference in New Issue
Block a user