Exporter

Search
Feedback

With the Exporter module the user can save the graphview that is currently displayed by the Structr Graph-Browser. The view will be stored in the context of the variable “currentViewId” wich has to be set as a global variable.

Dependencies for this module:

  • jquery
  • sigma.min.js
  • sigma.exporters.json.js
  • graph.browser.core.js
  • graph.browser.modulecontrol.js
  • graph.browser.restcontrol.js
  • graph.browser.modules.exporter.js

Settings

fields type description
onSuccess function Called when the graph view was succesfully saved
OnError function Called when something went wrong while saving the graph view

Example

var graphSettings = {
    graphContainer: 'graph-container',
    moduleSettings: {'exporter': {'onSuccess': myOnSuccessFunctiont, 'onError': myOnErrorFunction}}
};

var graphBrowser = new GraphBrowser(graphSettings);

Needed HTML fields

HTML IDs description
exporter-saveGraph-form-name Input field with whom the user can give the graph view a name
exporter-saveGraph-form-submit When the element with this id is clicked, the current graph view will be saved under the name wich must be specified in theexporter-saveGraph-form-name input field

Graph-Browser

About this article
Last change 2016-08-29
Topics ExperimentalStructr 2.0