Skip to content

Commit

Permalink
fixed respecting vertex-limit on edges query & handling special chara…
Browse files Browse the repository at this point in the history
…cters in property names (#105)

* fixed respecting vertex-limit on edges query

* fixed handling special characters in property names
  • Loading branch information
loplex authored Jun 22, 2022
1 parent a4cbf79 commit 42b6801
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/graphShapes.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ var graphShapes = (function(){
for (var prop_idx in item_properties){
var prop_name = item_properties[prop_idx];
var prop_id_nb = prop_idx;
var prop_id = item+"_"+prop_name;
var prop_id = item+"_"+CSS.escape(prop_name);
if((!d3.select("#"+prop_id).empty()) && d3.select("#"+prop_id).property("checked")){
attach_property(selected_items,prop_name,prop_id_nb,item);
}
Expand Down
5 changes: 4 additions & 1 deletion scripts/graphioGremlin.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ var graphioGremlin = (function(){
console.log("Node query: "+nodeQuery);
console.log("Edge query: "+edgeQuery);
send_to_server(nodeQuery, null, null, null, function(nodeData){
var vIdsArgs = graphson3to1(nodeData).map(function(v) { return `'${v.id}'` }).join();
edgeQuery = edgeQuery.replace(/^g.V\(\)/, `g.V(${vIdsArgs})`);
console.log("Edge query: "+edgeQuery);
send_to_server(edgeQuery, null, null, null, function(edgeData){
var combinedData = [nodeData,edgeData];
handle_server_answer(combinedData, 'search', null, message);
Expand Down Expand Up @@ -602,7 +605,7 @@ function get_vertex_prop_in_list(vertexProperty){
}

function graphson3to1(data){
// Convert data from graphSON v2 format to graphSON v1
// Convert data from graphSON v3 format to graphSON v1
if (!(Array.isArray(data) || ((typeof data === "object") && (data !== null)) )) return data;
if ('@type' in data) {
if (data['@type']=='g:List'){
Expand Down

0 comments on commit 42b6801

Please sign in to comment.