mirror of
https://github.com/atom/atom.git
synced 2026-02-10 14:45:11 -05:00
Remove decorationsForId from DecorationManager
This commit is contained in:
committed by
Antonio Scandurra
parent
69d5b63e9d
commit
fbf21e09d6
@@ -8,7 +8,6 @@ class DecorationManager {
|
||||
this.displayLayer = displayLayer
|
||||
|
||||
this.emitter = new Emitter()
|
||||
this.decorationsById = {}
|
||||
this.decorationsByMarker = new Map()
|
||||
this.overlayDecorations = new Set()
|
||||
this.layerDecorationsByMarkerLayer = new Map()
|
||||
@@ -33,10 +32,6 @@ class DecorationManager {
|
||||
return this.emitter.on('did-update-decorations', callback)
|
||||
}
|
||||
|
||||
decorationForId (id) {
|
||||
return this.decorationsById[id]
|
||||
}
|
||||
|
||||
getDecorations (propertyFilter) {
|
||||
let allDecorations = []
|
||||
|
||||
@@ -160,7 +155,6 @@ class DecorationManager {
|
||||
}
|
||||
decorationsForMarker.push(decoration)
|
||||
if (decoration.isType('overlay')) this.overlayDecorations.add(decoration)
|
||||
this.decorationsById[decoration.id] = decoration
|
||||
this.observeDecoratedLayer(marker.layer)
|
||||
this.emitDidUpdateDecorations()
|
||||
this.emitter.emit('did-add-decoration', decoration)
|
||||
@@ -203,7 +197,6 @@ class DecorationManager {
|
||||
|
||||
if (index > -1) {
|
||||
decorations.splice(index, 1)
|
||||
delete this.decorationsById[decoration.id]
|
||||
this.emitter.emit('did-remove-decoration', decoration)
|
||||
if (decorations.length === 0) {
|
||||
delete this.decorationsByMarker.delete(marker)
|
||||
|
||||
Reference in New Issue
Block a user