diff options
| author | Owen <despito@MacBook-Pro-de-Despito.local> | 2014-08-10 17:03:05 +0300 |
|---|---|---|
| committer | Owen <despito@MacBook-Pro-de-Despito.local> | 2014-08-10 17:03:05 +0300 |
| commit | df7f1e7f3362fb44b44c7000acbf1869bed2aae5 (patch) | |
| tree | 3503f97e92b44f690ef2430a5bd6d7b983ffd5a2 /scripts | |
| parent | 100e92c99d39fdbb28102d61127f180a05e4e995 (diff) | |
Issue #32
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/rhizicore.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/rhizicore.js b/scripts/rhizicore.js index facd9712..287c55e7 100644 --- a/scripts/rhizicore.js +++ b/scripts/rhizicore.js @@ -347,15 +347,13 @@ function myGraph(el) { } function dragged(d) { - - d3.select(this).classed("fixed", true); d3.select(this).attr("cx", d.x = d3.event.x).attr("cy", d.y = d3.event.y); } function dragended(d) { d3.select(this).classed("dragging", false); d3.select(this).classed("fixed", true); - //d3.select(this).attr("cx", d.x = d3.event.x).attr("cy", d.y = d3.event.y); + d3.select(this).attr("dx", d3.event.x).attr("dy", d3.event.y); } var force = d3.layout.force() @@ -503,7 +501,7 @@ function myGraph(el) { }) .on("click", function(d, i) { if(d.state!=="temp")showInfo(d, i); - else graph.removeHighlight(); + else graph.removeHighlight(); graph.update(); }); @@ -780,7 +778,9 @@ function showInfo(d, i) { if (d.type === "deliverable") { $('.info').html('Name: ' + d.id + '<br/><form id="editbox"><label>description:</label><input id="editdescription"/><br/><label>Type:</label><select id="edittype"><option value="person">Person</option><option value="project">Project</option><option value="skill">Skill</option><option value="deliverable">Deliverable</option><option value="objective">Objective</option></select><br/><label>Status</label><select id="editstatus"><option value="waiting">Waiting</option><option value="current">Current</option><option value="done">Done</option></select><br/><label>Start date:</label><input id="editstartdate"/><br/><label>End date:</label><input id="editenddate"/><br/><button>Save</button><button id="deletenode">Delete</button></form>'); - } else { + } else if(d.type=== "chainlink"){ + $('.info').html('Name: ' + d.id + '<br/><form id="editbox"><button>Save</button><button id="deletenode">Delete</button></form>'); + }else{ $('.info').html('Name: ' + d.id + '<br/><form id="editbox"><label>description:</label><input id="editdescription"/><br/><label>Type:</label><select id="edittype"><option value="person">Person</option><option value="project">Project</option><option value="skill">Skill</option><option value="deliverable">Deliverable</option><option value="objective">Objective</option></select><br/><label>URL:</label><input id="editurl"/><br/><button>Save</button><button id="deletenode">Delete</button></form>'); } |
