From 6f170ee183ff1a8053f44f02681f4735948e3f55 Mon Sep 17 00:00:00 2001 From: Owen Date: Wed, 13 Aug 2014 19:00:11 +0300 Subject: Issue #30 --- scripts/rhizicore.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'scripts') diff --git a/scripts/rhizicore.js b/scripts/rhizicore.js index 27f4d25b..a7cdefc1 100644 --- a/scripts/rhizicore.js +++ b/scripts/rhizicore.js @@ -118,12 +118,28 @@ function myGraph(el) { adjacentnode = findNode(links[i]['target'].id, null); if (adjacentnode.state !== "temp") adjacentnode.state = "exit"; links[i]['state'] = "exit"; + + if(links[i]['target'].type==="chainlink"){ + console.log("chain"); + while (j < links.length) { + if(links[i]['target'].id===links[j]['target'].id && links[j]['target'].type==="chainlink" && links[j]['target'].state!=="temp"){ + adjacentnode = findNode(links[j]['source'].id, null); + if (adjacentnode.state !== "temp") adjacentnode.state = "enter"; + links[j]['state'] = "enter"; + } + j++; + } + } + j=0; } if (links[i]['target'] === n) { adjacentnode = findNode(links[i]['source'].id, null); if (adjacentnode.state !== "temp") adjacentnode.state = "enter"; links[i]['state'] = "enter"; + + } + i++; } } else { -- cgit v1.3.1