Ticket #147 (closed Task: fixed)

Opened 13 years ago

Last modified 13 years ago

question: access to topicmap model from within a xyz_plugin.js

Reported by: Malte Owned by: jri
Priority: Trivial Milestone:
Component: DeepaMehta Standard Distribution Version: 4.0.5
Keywords: Cc:
Complexity: 1 Area: GUI
Module: deepamehta-webclient


on clientside, when extending the webclient (from within a xyz_plugin.js)

a) is there any possibility to get access to the data model (all topics/assocs or topicids/associd) of the currently visible topicmap?

b) and are "hidden" topics also part of that model?

I assume this is a ticket of type "Question"?

thanks for your help!

Change History

comment:1 Changed 13 years ago by jri

No, for the moment that's not possible. The topicmap model is private. I'll fix that quickly.

Would it be sufficient if you could get an topic/assoc iteration for iterating one-by-one?
And yes, the "hidden" topics would be accessible too (the map model has a per-topic "visibility" state).

comment:2 Changed 13 years ago by jri

  • Status changed from new to accepted

comment:3 Changed 13 years ago by Malte

yep, any kind of access would be fine for me. thank you very much.

comment:4 Changed 13 years ago by Jörg Richter

Topicmaps module: expose topicmap model (#147).

A plugin can access the model of the selected topicmap:

    // get selected topicmap
    var topicmap = dm4c.get_plugin("topicmaps_plugin").get_topicmap()
    // iterate through topics
    topicmap.iterate_topics(function(topic) {
        // access the topic's properties:
        topic.visibility    // boolean: true=visible, false=hidden
    // iterate through associations
    topicmap.iterate_associations(function(assoc) {
        // access the association's properties:

See ticket 147.

Last edited 13 years ago by jri (previous) (diff)

comment:5 Changed 13 years ago by jri

  • Status changed from accepted to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.