1
0
Fork 0

GraphViewer: Toolbox now created correctly

This commit is contained in:
Michael Hackstein 2013-04-12 10:58:54 +02:00
parent e49dbac52f
commit 4bfdf68b5c
3 changed files with 9 additions and 10 deletions

View File

@ -148,6 +148,7 @@
expect(group.children.length).toEqual(2); expect(group.children.length).toEqual(2);
// Correctness of buttons is checked in eventDispatcherUISpec. // Correctness of buttons is checked in eventDispatcherUISpec.
}); });
return true;
} }
}); });
}); });

View File

@ -136,7 +136,7 @@ function EventDispatcherControls(list, nodeShaper, edgeShaper, dispatcherConfig)
rebindNodes({click: nodeCallback}); rebindNodes({click: nodeCallback});
rebindEdges({click: edgeCallback}); rebindEdges({click: edgeCallback});
}; };
createIcon("edit", "edit", callback); createIcon("pencil", "edit", callback);
}; };
this.addControlExpand = function() { this.addControlExpand = function() {

View File

@ -74,17 +74,15 @@ function GraphViewerUI(container, adapterConfig) {
}, },
createToolbox = function() { createToolbox = function() {
var toolbox = document.createElement("div"), var toolbox = document.createElement("div"),
toollist = document.createElement("ul"), dispatcherUI = new EventDispatcherControls(
dispatcherUI = new EventDispatcherControls( toolbox,
toollist, graphViewer.nodeShaper,
graphViewer.nodeShaper, graphViewer.edgeShaper,
graphViewer.edgeShaper, graphViewer.dispatcherConfig
graphViewer.dispatcherConfig );
);
toolbox.id = "toolbox"; toolbox.id = "toolbox";
toolbox.className = "toolbox pull-left"; toolbox.className = "btn-group btn-group-vertical pull-left toolbox";
container.appendChild(toolbox); container.appendChild(toolbox);
toolbox.appendChild(toollist);
dispatcherUI.addAll(); dispatcherUI.addAll();
}, },
createMenu = function() { createMenu = function() {