Fix up computed_renderers_by_source keying
@@ -26,13 +26,17 @@ export class SelectToolView extends GestureToolView
_computed_renderers_by_data_source: () ->
renderers_by_source = {}
for r in @computed_renderers
+
if r instanceof GraphRenderer
- renderers_by_source[r.node_renderer.data_source.id] = [r]
+ source = r.node_renderer.data_source.id
else if r instanceof GlyphRenderer
- if !(r.data_source.id of renderers_by_source)
- renderers_by_source[r.data_source.id] = [r]
+ source = r.data_source.id
+
+ if !(source of renderers_by_source)
+ renderers_by_source[source] = [r]
else
- renderers_by_source[r.data_source.id] = renderers_by_source[r.data_source.id].concat([r])
+ renderers_by_source[source] = renderers_by_source[source].concat([r])
+
return renderers_by_source
_keyup: (e) ->
