[deepamehta-devel] custom renderer question

Jörg Richter jri at deepamehta.de
Mi Sep 4 21:39:08 CEST 2013


On Sep 4, 2013, at 18:14, Jörg Richter wrote:

> Just to clarify: do your plugin want
> 1) interfere with the **standard placement strategy** that is applied when a) the user creates a new topic via the standard menu or b) when she reveals a topic via a standard detail panel link? Or
> 2) [...]
> 
> In case of 1) I would have to equip the default renderer with a further extension point.

Here I forgot one thing: there **is** already an extension point that allows your plugin to interfere with the standard topic placement strategy. Just register a listener for the "pre_show_topic" event:

    dm4c.add_listener("pre_show_topic", function(topic) {
        topic.x = ...
        topic.y = ...
    })

However, when more than one plugin register such a listener they actually **compete** about the ultimate placement. The dm4-topicmaps module already registers such a listener to implement its own placement strategy: when the topic was already visible inside the current topicmap before, it is placed on its original position.
Further conceptualization might be required regarding competing plugins.

Cheers,
Jörg




Mehr Informationen über die Mailingliste devel