mirror of https://gitee.com/bigwinds/arangodb
Changed internal layout of the graphviewer, This fixes issues with the context menu, click events and display of edges to be
This commit is contained in:
parent
e22972578c
commit
a219bc8342
|
@ -1,11 +1,3 @@
|
|||
svg.graphViewer {
|
||||
background-color: white;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: rgba(0,0,0,0.125);
|
||||
margin-left: 74px;
|
||||
}
|
||||
|
||||
.gv_manageButtonContainer {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
svg.graphViewer {
|
||||
position: absolute;
|
||||
left: 74px;
|
||||
background-color: white;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: rgba(0,0,0,0.125);
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
div.gv_background {
|
||||
position: relative;
|
||||
height: 685px;
|
||||
}
|
||||
|
||||
img.searchSubmit {
|
||||
height: 16px;
|
||||
margin-left: -18px;
|
||||
|
@ -22,9 +37,9 @@ img.searchSubmit {
|
|||
}
|
||||
|
||||
.toolbox {
|
||||
margin-left: 5px;
|
||||
position: absolute;
|
||||
left: 5px;
|
||||
margin-right: 5px;
|
||||
margin-bottom: -340px;
|
||||
border-radius: 0px !important;
|
||||
-webkit-border-radius: 0px !important;
|
||||
-moz-border-radius: 0px !important;
|
||||
|
@ -177,12 +192,14 @@ button.gv-icon-btn.trash{
|
|||
background-image:url("../img/gv_trash.png");
|
||||
}
|
||||
div.gv_zoom_widget {
|
||||
position: relative;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
left: 95px;
|
||||
top: 20px;
|
||||
width: 40px;
|
||||
height: 300px;
|
||||
margin-bottom: -322px;
|
||||
}
|
||||
|
||||
div.gv_zoom_slider {
|
||||
margin: 0px 17px;
|
||||
width: 4px;
|
||||
|
@ -343,14 +360,14 @@ span.gv_caret {
|
|||
}
|
||||
|
||||
div.gv_colour_list {
|
||||
position: relative;
|
||||
position: absolute;
|
||||
right: 26px;
|
||||
top: 20px;
|
||||
text-align: right;
|
||||
height: 680px;
|
||||
max-height: 680px;
|
||||
overflow: auto;
|
||||
margin-bottom: -100%;
|
||||
float: right;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
div.gv_colour_list li {
|
||||
|
|
|
@ -462,6 +462,7 @@ function ArangoAdapter(nodes, edges, viewer, config) {
|
|||
};
|
||||
|
||||
self.createNode = function (nodeToAdd, callback) {
|
||||
console.log("Creating node");
|
||||
$.ajax({
|
||||
cache: false,
|
||||
type: "POST",
|
||||
|
|
|
@ -53,7 +53,9 @@ function ContextMenu(id) {
|
|||
},
|
||||
|
||||
bindMenu = function($objects) {
|
||||
menu = $.contextMenu.create(jqId, {shadow: false});
|
||||
menu = $.contextMenu.create(jqId, {
|
||||
shadow: false
|
||||
});
|
||||
$objects.each(function() {
|
||||
$(this).bind('contextmenu', function(e){
|
||||
menu.show(this,e);
|
||||
|
@ -64,13 +66,14 @@ function ContextMenu(id) {
|
|||
|
||||
divFactory = function() {
|
||||
div = document.getElementById(id);
|
||||
if (!div) {
|
||||
div = document.createElement("div");
|
||||
div.id = id;
|
||||
ul = document.createElement("ul");
|
||||
document.body.appendChild(div);
|
||||
div.appendChild(ul);
|
||||
if (div) {
|
||||
div.parentElement.removeChild(div);
|
||||
}
|
||||
div = document.createElement("div");
|
||||
div.id = id;
|
||||
ul = document.createElement("ul");
|
||||
document.body.appendChild(div);
|
||||
div.appendChild(ul);
|
||||
ul = div.firstChild;
|
||||
return div;
|
||||
};
|
||||
|
|
|
@ -433,7 +433,7 @@ function GraphViewerUI(container, adapterConfig, optWidth, optHeight, viewerConf
|
|||
};
|
||||
container.appendChild(menubar);
|
||||
container.appendChild(background);
|
||||
background.className = "thumbnails";
|
||||
background.className = "thumbnails gv_background ";
|
||||
background.id = "background";
|
||||
|
||||
viewerConfig = viewerConfig || {};
|
||||
|
|
Loading…
Reference in New Issue