From fbf21e09d68b590164a50911f8b019b61f5fd9a8 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Fri, 3 Mar 2017 06:01:23 -0700 Subject: [PATCH] Remove decorationsForId from DecorationManager --- src/decoration-manager.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/decoration-manager.js b/src/decoration-manager.js index 16dd1f921..d00c8dded 100644 --- a/src/decoration-manager.js +++ b/src/decoration-manager.js @@ -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)