From 89b290a6a30f5af4d5cdad32e67b0dd5c01f4053 Mon Sep 17 00:00:00 2001 From: ivanPozdnyakov Date: Wed, 6 Jan 2016 18:47:04 -0500 Subject: [PATCH] temporary empty entry saved as 0 (non-gui as well) --- VQI_PathwayEditor.js | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/VQI_PathwayEditor.js b/VQI_PathwayEditor.js index 1214901..d224495 100755 --- a/VQI_PathwayEditor.js +++ b/VQI_PathwayEditor.js @@ -587,9 +587,18 @@ var VQI_PathwayEditor = function (parent) { var target = lines[line][0]; if (typeof (lookup[target]) != "undefined") { for(entry in lookup[target]){ - lookup[target][entry].mut = lines[line][1]; - lookup[target][entry].cnv = lines[line][2]; - lookup[target][entry].rna = lines[line][3]; + var mut = "0"; + var cnv = "0"; + var rna = "0"; + if(lines[line][1] != "") + mut = lines[line][1]; + if(lines[line][2] != "") + cnv = lines[line][2]; + if(lines[line][3] != "") + rna = lines[line][3]; + lookup[target][entry].mut = mut; + lookup[target][entry].cnv = cnv; + lookup[target][entry].rna = rna; } } } @@ -599,9 +608,9 @@ var VQI_PathwayEditor = function (parent) { var cy = $('#' + parent + '-cy').cytoscape('get'); for (var line = 1; line < lines.length; line++) { var target = cy.elements("node[name = \"" + lines[line][0] + "\"]"); - var mut = 0; - var cnv = 0; - var rna = 0; + var mut = "0"; + var cnv = "0"; + var rna = "0"; if(lines[line][1] != "") mut = lines[line][1]; if(lines[line][2] != "")