From e9c973c06b407a5279b34d927d9106fd6a1d1f76 Mon Sep 17 00:00:00 2001 From: Ivan Pozdnyakov Date: Thu, 10 Sep 2015 17:46:49 -0400 Subject: [PATCH] basic interface for adding nodes/with edges --- code.js | 65 ++++++++++++++++++++++++++++++++++++++++++++++--------- index.php | 21 +++++++++++++----- 2 files changed, 70 insertions(+), 16 deletions(-) diff --git a/code.js b/code.js index c94d5f7..290b752 100644 --- a/code.js +++ b/code.js @@ -38,17 +38,62 @@ $(function () { // on dom ready selected: false shared_name: "TP73alpha" */ - function add(event) { - var node = { group: "nodes", x: 10, y: 35, - data: { Color: "ff0033",GraphId: "b6fd8", - Height: 27, Labelsize: 10, - SUID: "b6fd8", Type: "Protein", - Valign: "Middle", Width: 80.75, - XrefDatasource: "Uniprot-TrEMBL", - XrefId: 01530, id: "b6fd8", name: "O15350", - selected: false, shared_names: "TP73alpha" } }; + function add(event) { + var node = []; + var edges = []; - cy.add(node); + //parse table info + var name = document.getElementById("name").value; + var x = document.getElementById("data").rows.length; + for(var i=1; i" + respond + "").hide().fadeIn("fast"); }); - } }); @@ -53,25 +52,35 @@ function dataURLtoBlob(dataURL) { // Return our Blob object return new Blob([new Uint8Array(array)], {type: 'image/png'}); } - + - + -
Node:Element name: Type:
-
+
+
+
-
+