mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Remove specificity caching now handled by clear-cut
This commit is contained in:
@@ -5,7 +5,6 @@ _ = require 'underscore-plus'
|
||||
{validateSelector} = require './selector-validator'
|
||||
|
||||
SequenceCount = 0
|
||||
SpecificityCache = {}
|
||||
|
||||
# Public: Associates listener functions with commands in a
|
||||
# context-sensitive way using CSS selectors. You can access a global instance of
|
||||
@@ -241,7 +240,7 @@ class CommandRegistry
|
||||
|
||||
class SelectorBasedListener
|
||||
constructor: (@selector, @callback) ->
|
||||
@specificity = (SpecificityCache[@selector] ?= specificity(@selector))
|
||||
@specificity = specificity(@selector)
|
||||
@sequenceNumber = SequenceCount++
|
||||
|
||||
compare: (other) ->
|
||||
|
||||
@@ -9,7 +9,6 @@ MenuHelpers = require './menu-helpers'
|
||||
{validateSelector} = require './selector-validator'
|
||||
|
||||
platformContextMenu = require('../package.json')?._atomMenu?['context-menu']
|
||||
SpecificityCache = {}
|
||||
|
||||
# Extended: Provides a registry for commands that you'd like to appear in the
|
||||
# context menu.
|
||||
@@ -208,4 +207,4 @@ class ContextMenuManager
|
||||
|
||||
class ContextMenuItemSet
|
||||
constructor: (@selector, @items) ->
|
||||
@specificity = (SpecificityCache[@selector] ?= specificity(@selector))
|
||||
@specificity = specificity(@selector)
|
||||
|
||||
Reference in New Issue
Block a user