Skip to content
This repository has been archived by the owner on Nov 13, 2019. It is now read-only.

Commit

Permalink
update data2cytoscape
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinxin90 committed Dec 6, 2017
1 parent 95724e5 commit 8463230
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/static/js/data2Cytoscape.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,25 @@ function findSubPath (path) {
}

/**
* Display the connection between input and output based on selected path
* return {Cytoscape graph}
* get the path as a list
*/
function displayOutputToCytoscape() {
//extract value from input_value, and make it a list
function getPath() {
var _input_value = $("#input_value").val().split(",").map(function(item) { return item.trim(); });;
var _path_id = parseInt($("#select-path").find("option:selected").attr("value"));
var paths = extractPath();
var selected_path = paths[_path_id];
return [selected_path, _input_value]
}
/**
* Display the connection between input and output based on selected path
* return {Cytoscape graph}
*/
function displayOutputToCytoscape(selected_path, _input_value) {
//extract value from input_value, and make it a list
$("#log-list").empty();
$("#cy").empty();
$("#paths-list").empty();
var subpath = findSubPath(selected_path);
console.log(subpath);
var _level = 0;
var sequence = Promise.resolve();
var cy;
Expand Down

0 comments on commit 8463230

Please sign in to comment.