# HG changeset patch # User Nobuyasu Oshiro # Date 1363963875 -32400 # Node ID 992372c534792ac0b96029125836b4b094759ab3 # Parent b6031eb79cc06f734492d3c0d7f917cd0c2d1256 modified show.html diff -r b6031eb79cc0 -r 992372c53479 show.html --- a/show.html Fri Mar 22 06:24:46 2013 +0900 +++ b/show.html Fri Mar 22 23:51:15 2013 +0900 @@ -126,6 +126,7 @@ var nextX = x + (e.clientX - oElem.mouseX); var nextY = y + (e.clientY - oElem.mouseY); if (nextX < 0) nextX = 0; + if (nextY < 0) nextY = 0; oElem.style.left = nextX + 'px'; oElem.style.top = nextY + 'px'; oElem.mouseX = e.clientX; @@ -148,6 +149,7 @@ var y = parseInt(oElem.style.top); var node = GRAPH_DATA.nodes[oElem.nodeId]; if (x < 0) x = 0; + if (y < 0) y = 0; node.position.x = x; node.position.y = y; nodePositionPost(node); @@ -208,13 +210,21 @@ } } -function createEdgeInfoDiv(node,edgeInfo) { +function setEdgeInfoClickFunction(nodeId, edgeInfo, edgeInfoDiv) { + edgeInfoDiv.click(function(){ getEvidence(nodeId, edgeInfo); }); + edgeInfoDiv.hover( + function(){edgeInfoDiv.css("box-shadow","black 0 0 50px"); }, + function(){edgeInfoDiv.css("box-shadow","");} + ); +} + +function createEdgeInfoDiv(nodeId, edgeInfo) { function createEdgeInfoinnerHTML(_edgeInfo) { return _edgeInfo.kind + " : " + _edgeInfo.num + ": " + _edgeInfo.direction; } var edgeInfoDiv = $('
') edgeInfoDiv[0].innerHTML = createEdgeInfoinnerHTML(edgeInfo); - edgeInfoDiv.click(function(){ getEvidence(node.property.id, edgeInfo.kind, edgeInfo.direction, edgeInfo.id); }); + setEdgeInfoClickFunction(nodeId, edgeInfo, edgeInfoDiv); return edgeInfoDiv; } @@ -230,7 +240,9 @@ for (var i=0; i