1
0
Fork 0

Fixed a bug in graph viewer to list the label attribute

This commit is contained in:
Michael Hackstein 2014-06-30 17:19:13 +02:00
parent 9762c20424
commit 11a2f23c2b
2 changed files with 5 additions and 2 deletions

View File

@ -2,7 +2,7 @@
/*global document, $, _ */ /*global document, $, _ */
/*global EventDispatcherControls, NodeShaperControls, EdgeShaperControls */ /*global EventDispatcherControls, NodeShaperControls, EdgeShaperControls */
/*global LayouterControls, GharialAdapterControls*/ /*global LayouterControls, GharialAdapterControls*/
/*global GraphViewer, d3, window, alert*/ /*global GraphViewer, d3, window*/
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// @brief Graph functionality /// @brief Graph functionality
/// ///
@ -453,7 +453,7 @@ function GraphViewerUI(container, adapterConfig, optWidth, optHeight, viewerConf
} else { } else {
graphViewer.loadGraphWithRandomStart(function(node) { graphViewer.loadGraphWithRandomStart(function(node) {
if (node && node.errorCode) { if (node && node.errorCode) {
alertError("Sorry your graph seems to be empty"); window.alert("Sorry your graph seems to be empty");
} }
}); });
} }

View File

@ -292,6 +292,9 @@ var modalDialogHelper = modalDialogHelper || {};
}; };
addLineButton.id = id + "_addLine"; addLineButton.id = id + "_addLine";
addLineButton.className = "graphViewer-icon-button gv-icon-small add"; addLineButton.className = "graphViewer-icon-button gv-icon-small add";
if (typeof list === "string" && list.length > 0) {
list = [list];
}
if (list.length > 0) { if (list.length > 0) {
input.value = list[0]; input.value = list[0];
} }