Inspector Toolbar

Allows additional toolbar items to be added to the Inspector.


Web Plugin

Register the resources needed.

app.registerJavaScript("/org/visallo/examples/detail_toolbar/plugin.js", true);

Register Extension

Now, register the toolbar item.

visallo.registry.registerExtension('org.visallo.detail.toolbar', {
    title: i18n(''),
    event: 'detail-toolbar-google',
    canHandle: function(objects) {
        return objects.vertices.length === 1 && objects.edges.length === 0
            && /#person$/.test(objects.vertices[0].conceptType);


Register a document-level listener for the event specified in the extension. The formatters.vertex.title function transforms an element into a title string using the ontology title formula.

visallo.connect().then(function(api) {
    $(document).on('detail-toolbar-google', function(e, data) {
        var person = data.vertices[0];
        var name = api.formatters.vertex.title(person);
        var url = '' + name;, '_blank');

results matching ""

    No results matching ""