mirror of https://gitee.com/bigwinds/arangodb
GraphViewer: Toolbox now created correctly
This commit is contained in:
parent
e49dbac52f
commit
4bfdf68b5c
|
@ -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;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
Loading…
Reference in New Issue