jdhenke/celestrium — pull request #89 by willzeng (2013-12-06 12:08:43+00:00)
Title: Minimap

This data-set agnostic and passive minimap plugin is very basic (it only displays the centerNode and neighbors).

Future updates: it would make more sense for the MiniMap to respond directly to the GraphView rather than to go through NodeSelection. The sort of code I was thinking to implement this would be the following placed in init():

````
@graphView = instances['GraphView']
@graphView.on "enter:node", (nodeEnterSelection) =>
nodeEnterSelection.on("click", (datum, index) =>
console.log "datum: ", datum
@mostRecentNode = datum
@update()
)
````

The reason I haven't implemented this yet is that defining this second on("click") function overwrites the functionality of the one in NodeSelection causing that to break.

Suggestions on how to get around this?

This is a bit related to the issue mentioned earlier in https://github.com/jdhenke/celestrium/pull/81 of either

- allowing NodeSelection to be defined with additional functions that would be called by clicking on a node.
- having NodeSelection fire onclick events

where the second seems like the way to go.