From 1579b55bdbb85cf0da9b6a7dbfe8b30fe9813e2f Mon Sep 17 00:00:00 2001 From: Mufei Li Date: Wed, 6 Oct 2021 14:12:47 +0800 Subject: [PATCH] Fix NLabel Switch in Custom Subgraph Visualization (#8) * Update * Remove redundant files * Remove extra data files * License header * Update * Fix NLabel switch in custom subgraph visualization --- python/gnnlens/visbuild/asset-manifest.json | 8 ++--- python/gnnlens/visbuild/index.html | 2 +- ...nifest.61eeda3f5dd1495de4355615963b0c0f.js | 34 +++++++++++++++++++ python/gnnlens/visbuild/service-worker.js | 2 +- .../visbuild/static/js/main.e553e190.chunk.js | 2 ++ .../static/js/main.e553e190.chunk.js.map | 1 + .../DataRuns/GraphView/GraphView.tsx | 5 +++ 7 files changed, 48 insertions(+), 6 deletions(-) create mode 100644 python/gnnlens/visbuild/precache-manifest.61eeda3f5dd1495de4355615963b0c0f.js create mode 100644 python/gnnlens/visbuild/static/js/main.e553e190.chunk.js create mode 100644 python/gnnlens/visbuild/static/js/main.e553e190.chunk.js.map diff --git a/python/gnnlens/visbuild/asset-manifest.json b/python/gnnlens/visbuild/asset-manifest.json index 6cc8312..a29e2d7 100644 --- a/python/gnnlens/visbuild/asset-manifest.json +++ b/python/gnnlens/visbuild/asset-manifest.json @@ -1,15 +1,15 @@ { "files": { "main.css": "/static/css/main.8d5084fd.chunk.css", - "main.js": "/static/js/main.0f983eeb.chunk.js", - "main.js.map": "/static/js/main.0f983eeb.chunk.js.map", + "main.js": "/static/js/main.e553e190.chunk.js", + "main.js.map": "/static/js/main.e553e190.chunk.js.map", "runtime-main.js": "/static/js/runtime-main.ce081a3c.js", "runtime-main.js.map": "/static/js/runtime-main.ce081a3c.js.map", "static/css/2.929389fa.chunk.css": "/static/css/2.929389fa.chunk.css", "static/js/2.b9f0e663.chunk.js": "/static/js/2.b9f0e663.chunk.js", "static/js/2.b9f0e663.chunk.js.map": "/static/js/2.b9f0e663.chunk.js.map", "index.html": "/index.html", - "precache-manifest.3a7ce0b24b434c72ea8841a90af31981.js": "/precache-manifest.3a7ce0b24b434c72ea8841a90af31981.js", + "precache-manifest.61eeda3f5dd1495de4355615963b0c0f.js": "/precache-manifest.61eeda3f5dd1495de4355615963b0c0f.js", "service-worker.js": "/service-worker.js", "static/css/2.929389fa.chunk.css.map": "/static/css/2.929389fa.chunk.css.map", "static/css/main.8d5084fd.chunk.css.map": "/static/css/main.8d5084fd.chunk.css.map", @@ -21,6 +21,6 @@ "static/css/2.929389fa.chunk.css", "static/js/2.b9f0e663.chunk.js", "static/css/main.8d5084fd.chunk.css", - "static/js/main.0f983eeb.chunk.js" + "static/js/main.e553e190.chunk.js" ] } \ No newline at end of file diff --git a/python/gnnlens/visbuild/index.html b/python/gnnlens/visbuild/index.html index 25ba5f8..3a7eece 100644 --- a/python/gnnlens/visbuild/index.html +++ b/python/gnnlens/visbuild/index.html @@ -1 +1 @@ -GNNLens
\ No newline at end of file +GNNLens
diff --git a/python/gnnlens/visbuild/precache-manifest.61eeda3f5dd1495de4355615963b0c0f.js b/python/gnnlens/visbuild/precache-manifest.61eeda3f5dd1495de4355615963b0c0f.js new file mode 100644 index 0000000..ac817fe --- /dev/null +++ b/python/gnnlens/visbuild/precache-manifest.61eeda3f5dd1495de4355615963b0c0f.js @@ -0,0 +1,34 @@ +self.__precacheManifest = (self.__precacheManifest || []).concat([ + { + "revision": "de37e4e7fb95e71314f42048ef5bb255", + "url": "/index.html" + }, + { + "revision": "df959a132ebb6c1acbb3", + "url": "/static/css/2.929389fa.chunk.css" + }, + { + "revision": "e7066fbd30295823adf7", + "url": "/static/css/main.8d5084fd.chunk.css" + }, + { + "revision": "df959a132ebb6c1acbb3", + "url": "/static/js/2.b9f0e663.chunk.js" + }, + { + "revision": "ca9e56bc4f9848094e5b4e249ca2f146", + "url": "/static/js/2.b9f0e663.chunk.js.LICENSE.txt" + }, + { + "revision": "e7066fbd30295823adf7", + "url": "/static/js/main.e553e190.chunk.js" + }, + { + "revision": "2d9282ac3e4bee87b5f2", + "url": "/static/js/runtime-main.ce081a3c.js" + }, + { + "revision": "4b8ec5cf962ffb622f6d7c0a1a8f8385", + "url": "/static/media/logo2.4b8ec5cf.png" + } +]); \ No newline at end of file diff --git a/python/gnnlens/visbuild/service-worker.js b/python/gnnlens/visbuild/service-worker.js index c0d5c5c..150a8df 100644 --- a/python/gnnlens/visbuild/service-worker.js +++ b/python/gnnlens/visbuild/service-worker.js @@ -14,7 +14,7 @@ importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); importScripts( - "/precache-manifest.3a7ce0b24b434c72ea8841a90af31981.js" + "/precache-manifest.61eeda3f5dd1495de4355615963b0c0f.js" ); self.addEventListener('message', (event) => { diff --git a/python/gnnlens/visbuild/static/js/main.e553e190.chunk.js b/python/gnnlens/visbuild/static/js/main.e553e190.chunk.js new file mode 100644 index 0000000..73cbf15 --- /dev/null +++ b/python/gnnlens/visbuild/static/js/main.e553e190.chunk.js @@ -0,0 +1,2 @@ +(this.webpackJsonpgnnlens=this.webpackJsonpgnnlens||[]).push([[0],{132:function(e,t,n){e.exports=n.p+"static/media/logo2.4b8ec5cf.png"},145:function(e,t,n){e.exports=n(247)},150:function(e,t,n){},151:function(e,t,n){},153:function(e,t,n){},203:function(e,t,n){},212:function(e,t,n){},245:function(e,t,n){},246:function(e,t,n){},247:function(e,t,n){"use strict";n.r(t);var a=n(0),r=n.n(a),o=n(2),i=n.n(o),s=(n(150),n(15)),c=n(16),l=n(13),h=n(19),u=n(18),d=n(258),p=n(132),g=n.n(p),f=(n(151),n(103)),v=n(12),b=n.n(v),_=n(27),m=(n(153),n(252)),w=n(255),E=n(64),y=n(259),O=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],C=["#498B77","#89C2AE","#C1D6D3"],L=["#DC143C"],N=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return 1===t||2===t||3===t?O[e]:5===t?e?C[0]:L[0]:void 0};function x(e){return{senders:e.srcs,receivers:e.dsts,num_nodes:e.num_nodes}}function k(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.1;return.9*(e-0)+t}var S=n(251),j=n(17),G=n(5),D=n(253),I=n(254),A=function(e){Object(h.a)(n,e);var t=Object(u.a)(n);function n(e){var a;return Object(s.a)(this,n),(a=t.call(this,e)).handleOk=function(e){console.log(e),a.props.changeGraphViewSettingsModal_visible(!1)},a.handleCancel=function(e){console.log(e),a.props.changeGraphViewSettingsModal_visible(!1)},a.handleUnfocusedNodesChange=function(e){var t=e.target.checked,n=a.props.GraphViewState;a.props.changeGraphViewState(Object(G.a)(Object(G.a)({},n),{},{DisplayUnfocusedNodes:t}))},a.handleOverviewChange=function(e){var t=e.target.checked,n=a.props.GraphViewState;a.props.changeGraphViewState(Object(G.a)(Object(G.a)({},n),{},{DisplayOverview:t}))},a.state={},a}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props.GraphViewState;return a.createElement(D.a,{title:"Graph View Settings",visible:this.props.GraphViewSettingsModal_visible,onOk:this.handleOk,onCancel:this.handleCancel,footer:[a.createElement(E.a,{key:"OK",type:"primary",onClick:this.handleOk},"OK")]},"Rendering Options:",a.createElement("div",null,a.createElement(I.a,{checked:e.DisplayUnfocusedNodes,onChange:this.handleUnfocusedNodesChange},"Display unfocused nodes."),a.createElement("br",null),a.createElement(I.a,{checked:e.DisplayOverview,onChange:this.handleOverviewChange},"Display overview.")))}}]),n}(a.Component),H=function(e){return{type:"GRAPHVIEWSETTINGMODAL_VISIBLE_CHANGE",GraphViewSettingsModal_visible:e}},W=function(e){return{type:"ENABLE_FORCE_DIRECTED_CHANGE",enableForceDirected:e}},V=function(e){return{type:"SHOW_SOURCE_CHANGE",showSource:e}},M=function(e){return{type:"NLABEL_CHANGE",NLabelList:e}},P=function(e){return{type:"EWEIGHT_CHANGE",eweightList:e}},T=Object(j.b)((function(e){return{GraphViewSettingsModal_visible:e.GraphViewSettingsModal_visible,GraphViewState:e.GraphViewState}}),(function(e){return{changeGraphViewSettingsModal_visible:function(t){return e(H(t))},changeGraphViewState:function(t){return e(function(e){return{type:"GRAPHVIEWSTATE_CHANGE",GraphViewState:e}}(t))}}}))(A);n(203);function R(e,t,n,a,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#bbb";e.beginPath(),e.strokeStyle=o,e.rect(t,n,a,r),e.stroke()}function F(e,t,n,a,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fff",i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:.8;e.fillStyle=o,e.globalAlpha=i,e.fillRect(t,n,a,r),e.globalAlpha=1}function B(e,t,n,a,r,o){e.lineWidth=o,e.strokeStyle=t,e.beginPath(),e.arc(a,r,n,0,2*Math.PI,!0),e.stroke()}function J(e,t,n,a,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,i=e.globalAlpha;e.globalAlpha=o,e.beginPath(),e.arc(a,r,n,0,2*Math.PI,!0),e.fillStyle=t,e.fill(),e.globalAlpha=i}function U(e,t,n,a,r,o,i){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:1,c=e.globalAlpha;e.globalAlpha=s,e.beginPath(),e.moveTo(a,r),e.arc(a,r,n,o,i),e.fillStyle=t,e.closePath(),e.fill(),e.globalAlpha=c}function z(e,t,n,a,r,o,i){var s=arguments.length>7&&void 0!==arguments[7]&&arguments[7],c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:.5,l=!(arguments.length>10&&void 0!==arguments[10])||arguments[10],h=c;h<0?h=0:h>1&&(h=1);var u=1;l&&(u=h);var d=t.length-1;if(d>0){J(e,"#fff",r,o,i,u),s&&B(e,"#000",r,o,i,2);for(var p=360/d,g=-90-p/2,f=1;f1){g=-90-p/2;for(var _=1;_6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:1,c=e.globalAlpha,l=s;l<0?l=0:l>1&&(l=1),e.globalAlpha=l,e.strokeStyle=t,i&&(e.lineWidth=i),e.beginPath(),e.moveTo(n,a),e.lineTo(r,o),e.stroke(),e.globalAlpha=c}var K=n(204),Y=function(e){Object(h.a)(n,e);var t=Object(u.a)(n);function n(e){var a;return Object(s.a)(this,n),(a=t.call(this,e)).global_simulation=null,a.saved_transform=null,a.refresh_number=0,a.current_graph_json=null,a.updateTransform=a.updateTransform.bind(Object(l.a)(a)),a.state={},a}return Object(c.a)(n,[{key:"componentDidMount",value:function(){this.renderCanvas()}},{key:"componentDidUpdate",value:function(e,t){e.graph_json.name===this.props.graph_json.name&&e.width===this.props.width&&e.GraphViewState===this.props.GraphViewState||this.renderCanvas()}},{key:"updateTransform",value:function(e){this.saved_transform=e}},{key:"renderLegend",value:function(e){var t=e.width,n=e.height,a=e.colorLegend,r=n-10-100,o=K.select("#force_directed_graph").select("#svgChart").attr("width",t).attr("height",n),i=0;a.forEach((function(e){var t=""+e.text;t.length>i&&(i=t.length)}));var s=8*i+24,c=20*a.length,l=r-c-10,h=o.select("#ForceDirectedColorLegend").attr("width",s).attr("height",c).attr("transform","translate(10,"+l+")"),u=h.selectAll("rect").data([0]);u.enter().append("rect").merge(u).attr("x",0).attr("y",0).attr("width",s).attr("height",c).attr("fill","#fff").attr("opacity",.8).attr("stroke","#bbb").attr("stroke-width",1).attr("rx",3).attr("ry",3);var d=h.selectAll("g.legend_row_color").data(a,(function(e,t){return e.text+"_"+t+"_"+e.color})),p=d.enter().append("g").attr("class","legend_row_color").attr("transform",(function(e,t){return"translate(10,"+(10+20*t)+")"}));p.append("circle").attr("r",5).attr("fill",(function(e){return e.color})),p.append("text").attr("x",10).attr("y",5).text((function(e){return e.text})),d.exit().remove()}},{key:"renderCanvas",value:function(){this.props.UpdateCurrentGraphJson(this.props.graph_json);var e=this.props.onNodeClick,t=this.props.graph_json.nodenum,n=this.props.graph_json.enable_forceDirected,a=this.props.graph_json.NeighborSet,r=this.props.graph_json.colorLegend,o={strength:.01,radius:15,showlabel:!0,showarrow:!0,width:this.props.width,height:this.props.height},i=this.props.GraphViewState,s=i.DisplayUnfocusedNodes,c=i.DisplayOverview;t>=100&&(o={strength:.4,radius:3,showlabel:!1,showarrow:!1,width:this.props.width,height:this.props.height});var l=o.width,h=o.height,u=o.radius,d=this.props.width,p={width:l,height:h,colorLegend:r};this.renderLegend(p);var g=K.select("#force_directed_graph").select("#bottom").attr("width",d+"px").attr("height",h+"px").node().getContext("2d"),f=K.select("#force_directed_graph").select("#middle").attr("width",d+"px").attr("height",h+"px").node(),v=f.getContext("2d"),b=K.select("#force_directed_graph").select("#overview").attr("width",d+"px").attr("height",h+"px").node().getContext("2d"),_=K.select("#force_directed_graph").select("#event").attr("width",d+"px").attr("height",h+"px").node(),m=d-100-10,w=h-100-10,E=m+100,y=w+100,O=3*u+.3*3;this.global_simulation&&(this.global_simulation.stop(),delete this.global_simulation);var C=K.forceSimulation().force("center",K.forceCenter(d/2,h/2)).force("x",K.forceX(d/2).strength(.1)).force("y",K.forceY(h/2).strength(.1)).force("charge",K.forceManyBody().strength(-50)).force("link",K.forceLink().strength(1).id((function(e){return e.id}))).force("collide",K.forceCollide().radius((function(e){return O}))).alphaTarget(0).alphaDecay(.05);this.global_simulation=C;var L,N=this.updateTransform,x={x:0,y:0,k:1};function k(e,t){return e.hasOwnProperty("hovered")&&!1!==e.hovered?!0!==t:!1!==t}function S(){K.select("#force_directed_graph").select("#tooltip").style("opacity",0)}L=this.saved_transform?this.saved_transform:K.zoomIdentity;var j=this.props.graph_json,G=_,D=null;function I(e,t){var n=e.hasOwnProperty("hover_cons")?e.hover_cons:1,a=t.hasOwnProperty("hover_cons")?t.hover_cons:1;return e.radius*n*2=0;--n){var l=c[n];if(s||l.highlight){a=o-l.x,r=i-l.y;var h=l.hasOwnProperty("hover_cons")?l.hover_cons:1,u=2*l.radius*h;if(a*a+r*r0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t?e=D:(e=K.mouse(this),D=e);var r=n;if(e){var o=W(e[0],e[1]),i=A(e[0],e[1]);if("GraphCanvas"===o&&i){r=!0;var s=i.id;K.select("#force_directed_graph").select("#tooltip").style("opacity",.8).style("top",e[1]+5+"px").style("left",e[0]+5+"px").html(s);var c=a[i.id];j.nodes.forEach((function(e){s===e.id?(e.hovered=!0,e.hover_cons=3):c.indexOf(e.id)>=0?(e.hovered=!0,e.hover_cons=2):(e.hovered=!1,e.hover_cons=1)}))}else j.nodes.forEach((function(e){r=r||k(e,!1),e.hovered=!1,e.hover_cons=1})),S()}else j.nodes.forEach((function(e){r=r||k(e,!1),e.hovered=!1,e.hover_cons=1})),S();r&&J()}function W(e,t){return e>=m&&e<=E&&t>=w&&t<=y&&c?"OverviewCanvas":"GraphCanvas"}function V(e,t){var n=e.x,a=e.y,r=e.width,o=e.height,i=-t.x,s=-t.y,c=1/t.k;return{x:(n+i)*c,y:(a+s)*c,width:r*c,height:o*c}}function M(e,t){var n=e.x,a=e.y,r=-t.x,o=-t.y,i=1/t.k;return{x:(n+r)*i,y:(a+o)*i}}function P(e,t){var n={x:d/2,y:h/2},a=M(n,L),r={x:e,y:t},o=M(r,x),i=-(o.x-a.x)*L.k+L.x,s=-(o.y-a.y)*L.k+L.y;console.log({ori_point:n,ori_inverse_point:a,overview_point:r,overview_inverse_point:o,new_x:i,new_y:s}),L.x=i,L.y=s,N(L),B()}function T(e){s&&(j.links.filter((function(e){return!e.source.highlight||!e.target.highlight})).forEach((function(t){X(e,t.color,t.source.x,t.source.y,t.target.x,t.target.y,null,t.weight)})),j.nodes.filter((function(e){return!e.highlight})).forEach((function(t,n){var a=t.radius-.3,r=t.radius,o=2*t.radius,i=t.node_weight,s=o+1.5;z(e,t.color,a,r,o,t.x,t.y,!1,i,s)}))),j.links.filter((function(e){return!(!e.source.highlight||!e.target.highlight)})).forEach((function(t){X(e,t.color,t.source.x,t.source.y,t.target.x,t.target.y,5*t.weight,t.weight)})),j.nodes.filter((function(e){return e.highlight})).forEach((function(t,n){var a=t.radius-.3,r=t.radius,o=2*t.radius,i=t.node_weight,s=o+1.5;z(e,t.color,a,r,o,t.x,t.y,!1,i,s)}))}function B(){if(g.save(),g.clearRect(0,0,d,h),g.translate(L.x,L.y),g.scale(L.k,L.k),T(g),g.restore(),c){var e=function(){var e=0,t=0,n=0,a=0,r=!1;return j.nodes.forEach((function(o){if(s||!s&&o.highlight){var i=o.x,c=o.y;r?(e>i&&(e=i),nc&&(t=c),as&&(d=s),uc&&(p=c);var g=d-h,f=p-u;return g<0?g=0:g>i&&(g=i),f<0?f=0:f>o&&(f=o),{x:h,y:u,width:g,height:f}}(t,L,a),x);b.save(),b.clearRect(0,0,d,h),R(b,m,w,100,100),F(b,m,w,100,100),b.translate(x.x,x.y),b.scale(x.k,x.k),T(b),b.scale(1/x.k,1/x.k),b.translate(-x.x,-x.y),R(b,r.x,r.y,r.width,r.height,"#000"),F(b,r.x,r.y,r.width,r.height,"#ccc",.5),b.restore()}H(f,!0)}function J(){var e=function(e){return!(!e.hasOwnProperty("hovered")||!e.hovered)};v.save(),v.clearRect(0,0,d,h),v.translate(L.x,L.y),v.scale(L.k,L.k),j.links.filter((function(t){return!(!e(t.source)||!e(t.target))})).forEach((function(e){X(v,e.real_color,e.source.x,e.source.y,e.target.x,e.target.y,null,e.weight)})),j.nodes.filter((function(t){return e(t)})).sort(I).forEach((function(e,t){var n=e.radius-.3,a=e.radius,r=2*e.radius,o=e.node_weight,i=r+1.5;z(v,e.real_color,n*e.hover_cons,a*e.hover_cons,r*e.hover_cons,e.x,e.y,!0,o,i*e.hover_cons,!1)})),v.restore()}K.select(G).on("click",(function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(K.event.defaultPrevented)return;n?t=D:(t=K.mouse(this),D=t);if(t)if("OverviewCanvas"===W(t[0],t[1]))P(t[0],t[1]);else{var a=A(t[0],t[1]);a&&e(a.id)}})).on("mousemove",H).on("mouseout",(function(){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=e;D=null,j.nodes.forEach((function(e){t=t||k(e,!1),e.hovered=!1,e.hover_cons=1})),S(),t&&J()})),K.select(G).call(K.zoom().scaleExtent([.1,8]).on("zoom",(function(){var e=K.mouse(this);D=e,L=K.event.transform,"GraphCanvas"===W(e[0],e[1])&&(N(L),B())}))),n?(C.nodes(j.nodes).on("tick",B),C.force("link").links(j.links)):(C.stop(),C.nodes(j.nodes),C.force("link").links(j.links),B())}},{key:"render",value:function(){return a.createElement("div",{id:"force_directed_graph"},a.createElement("canvas",{id:"bottom",className:"AbsPos"}),a.createElement("canvas",{id:"middle",className:"AbsPos"}),a.createElement("canvas",{id:"overview",className:"AbsPos"}),a.createElement("svg",{id:"svgChart",xmlns:"http://www.w3.org/2000/svg",className:"AbsPos"},a.createElement("g",{id:"ForceDirectedLegend"}),a.createElement("g",{id:"ForceDirectedColorLegend"})),a.createElement("div",{id:"tooltip",className:"AbsPos"}),a.createElement("canvas",{id:"event",className:"AbsPos"}))}}]),n}(a.Component),$=Object(j.b)((function(e){return{GraphViewState:e.GraphViewState}}),(function(e){return{}}))(Y),q=m.a.Option,Q=function(e){Object(h.a)(n,e);var t=Object(u.a)(n);function n(e){var a;return Object(s.a)(this,n),(a=t.call(this,e)).prevGraphJson=null,a.onEnableForceDirected=a.onEnableForceDirected.bind(Object(l.a)(a)),a.onExtendedModeChange=a.onExtendedModeChange.bind(Object(l.a)(a)),a.onNodeClick=a.onNodeClick.bind(Object(l.a)(a)),a.onChangeSelectInspectNode=a.onChangeSelectInspectNode.bind(Object(l.a)(a)),a.UpdateCurrentGraphJson=a.UpdateCurrentGraphJson.bind(Object(l.a)(a)),a.state={},a}return Object(c.a)(n,[{key:"UpdateCurrentGraphJson",value:function(e){this.prevGraphJson=e}},{key:"onNodeClick",value:function(e){!1===this.props.showSource?(this.props.changeSelectInspectNode(e),this.props.changeShowSource(!0),this.props.changeExtendedMode(3)):this.props.changeSelectInspectNode(e)}},{key:"getColorLegend",value:function(e,t){var n=[];if(e)for(var a=0;a-1?v.eweights[o]:O[o]):H=!1;for(var P=0;P=0&&i.indexOf(w[P])>=0&&(T="#bbb"),D.indexOf(T)>=0||D.push(T),G.push({source:m[P],target:w[P],value:1,weight:k(R),color:T,real_color:"#bbb"})}return{success:!0,name:d,nodes:j,links:G,links_color:D,nodenum:E,edgenum:y,enable_forceDirected:s,colorLegend:this.getColorLegend(I,v.num_nlabel_types)}}},{key:"constructEdgeGraphJson",value:function(e,t,n,a,r,o,i,s,c,l){var h=n.join("_"),u=e,d=u.name+"_"+u.bundle_id+"_SUBG_"+r+"_SUBGEND__NLABEL_"+h+"_NLABELEND__NODE_"+a+"_NODEEND_"+i+"_"+c+"_"+l+"_",p=u.num_nodes,g=u.srcs.length,f=u.nlabels,v=u.srcs,b=u.dsts,_=o[r][a].nodes,m=o[r][a].eids,w=o[r][a].nweight,E=o[r][a].eweight,y=i,O=!1,C=this.prevGraphJson;C&&C.success&&C.nodes.length===p&&(O=!0);var L=[],x=[],S=[],j=0!==n.length,G=[];j||(G=["#aaa"]);var D=0;console.log("select_inspect_node",a),console.log("showSource",s),console.log("selectedNodeIdList",_);for(var I=function(e){var r,o=e,i=1,c=1,l=G.slice();n.forEach((function(e){if("ground_truth"===e){var n=f[o];l.push(N(n,2))}else{var a=t[e][o];l.push(N(a,2))}})),r=l.slice(),_[D]===e?(c=w[D],D+=1):(l=["#ddd"],i=0);var h=3;o===a&&!0===s&&(h=6);var u={id:o,group:0,color:l,real_color:r,radius:h,highlight:i,node_weight:k(c)};O&&(u.x=C.nodes[e].x,u.y=C.nodes[e].y),L.push(u)},A=0;A=0||S.push(V),x.push({source:v[W],target:b[W],value:1,weight:k(M),color:V,real_color:"#bbb"})}return{success:!0,name:d,nodes:L,links:x,links_color:S,nodenum:p,edgenum:g,enable_forceDirected:y,colorLegend:this.getColorLegend(j,u.num_nlabel_types)}}},{key:"onEnableForceDirected",value:function(e){console.log("Change State,",e),this.props.changeEnableForceDirected(e)}},{key:"onExtendedModeChange",value:function(e){this.props.changeExtendedMode(e)}},{key:"constructExtendedSelectedNodeIdList",value:function(e,t){if(0===e.length)return[];for(var n=e.slice(),a=0;a=t&&(n=t-1),console.log("graphview, new_node_id",n),this.props.changeSelectInspectNode(n)}},{key:"showGraphViewSettingModal",value:function(){this.props.changeGraphViewSettingsModal_visible(!0)}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.graph_object,o=n.model_nlabels,i=n.model_eweights,s=n.model_nweights,c=n.subgs,l=n.NLabelList,h=n.eweightList,u=n.subgList,d=n.selectedNodeIdList,p=n.showSource,g=n.select_inspect_node,f=n.width,v=n.height,b=n.extendedMode,_=this.onNodeClick,O=this.UpdateCurrentGraphJson,C=d,L=function(e){for(var t=e.senders,n=e.receivers,a=e.num_nodes,r={},o=0;o650?k=v-50-23:f<=650&&(k=v-50-47):f<650&&f>550?k=v-50-23:f<=550&&(k=v-50-47),b<=3)p&&(C=[g]),2===b?C=this.constructExtendedSelectedNodeIdList(C,L):3===b&&(C=this.constructExtendedSelectedNodeIdList(C,L),C=this.constructExtendedSelectedNodeIdList(C,L)),e=this.constructNodeGraphJson(r,o,i,s,l,h,C,this.props.enableForceDirected,g,p,N,k);else{var j=u[b-4];C=c[j][g].nodes,e=this.constructEdgeGraphJson(r,o,l,g,j,c,this.props.enableForceDirected,p,N,k)}if(e.NeighborSet=L,e.success){for(var G=e.nodenum,D=[[1,"None"],[2,"One Hop"],[3,"Two Hop"]],I=0;I=0?(this.getGraphBundledData(this.props.dataset_id),this.getModelData(this.props.dataset_id),this.getSubgraphData(this.props.dataset_id)):this.setState({graph_object:{model:-1,graph:-1}})),e.contentHeight===this.props.contentHeight&&e.contentWidth===this.props.contentWidth||this.setState({layout_config:this.getWholeLayoutConfig()})}},{key:"onLayoutChange",value:function(e){}},{key:"onResizeStop",value:function(e){console.log("onResizeStop",e),console.log("Layout",this.getWholeLayoutConfig()),this.setState({layout_config:this.getWholeLayoutConfig()})}},{key:"render",value:function(){var e=this,t=this.state,n=t.graph_object,r=t.model_nlabels,o=t.model_eweights,i=-1;if(n.bundle_id){i=n.bundle_id;var s=[];console.log("graph_object",n),0!==n.nlabels.length&&s.push("ground_truth"),null!==r&&(s=s.concat(Object.keys(r))),this.props.changeNLabelOptions(s);var c=[];c=Object.keys(n.eweights),null!==o&&(c=c.concat(Object.keys(o))),this.props.changeEWeightOptions(c)}var l=Math.floor(this.props.contentHeight/40),h=[{i:"b",x:5,y:0,w:19,h:l,static:!0},{i:"d",x:0,y:0,w:5,h:l,static:!0}];return function(){var t=window.innerWidth;return a.createElement("div",null,a.createElement(Ge.a,{className:"layout",layout:h,cols:24,rowHeight:30,width:t,onLayoutChange:e.onLayoutChange,onResizeStop:e.onResizeStop},a.createElement("div",{className:"PanelBox",key:"b",ref:e.GraphViewRef},i>=0&&e.getCurrentLayoutConfig("GraphView")?function(e,t,n,r,o,i,s,c,l,h){return a.createElement(Z,{graph_object:e,model_nlabels:t,model_eweights:n,model_nweights:r,subgs:o,NLabelList:i,eweightList:s,subgList:c,width:l,height:h})}(n,e.state.model_nlabels,e.state.model_eweights,e.state.model_nweights,e.state.subgs,e.props.NLabelList,e.props.eweightList,e.state.subg_list,e.getCurrentLayoutConfig("GraphView").width,e.getCurrentLayoutConfig("GraphView").height):a.createElement("div",null)),a.createElement("div",{className:"PanelBox",key:"d",ref:e.ControlPanelRef},a.createElement(Se,null))))}()}}]),n}(a.Component),Ie=Object(j.b)((function(e){return{dataset_id:e.dataset_id,NLabelList:e.NLabelList,eweightList:e.eweightList}}),(function(e){return{changeEnableForceDirected:function(t){return e(W(t))},changeNLabelOptions:function(t){return e(function(e){return{type:"NLABEL_OPTIONS_CHANGE",NLabelOptions:e}}(t))},changeEWeightOptions:function(t){return e(function(e){return{type:"EWEIGHT_OPTIONS_CHANGE",EWeightOptions:e}}(t))},changeNLabel:function(t){return e(M(t))},changeEWeight:function(t){return e(P(t))},changeShowSource:function(t){return e(V(t))}}}))(De),Ae=d.a.Content,He=d.a.Header,We=function(e){Object(h.a)(n,e);var t=Object(u.a)(n);function n(e){var a;return Object(s.a)(this,n),(a=t.call(this,e)).ContentRef=void 0,a.ContentRef=r.a.createRef(),a.onResize=a.onResize.bind(Object(l.a)(a)),a.state={contentWidth:0,contentHeight:0,screenHeight:0,screenWidth:0},a}return Object(c.a)(n,[{key:"getLayoutConfig",value:function(){var e=0,t=0;return this.ContentRef&&(e=this.ContentRef.current.offsetWidth,t=this.ContentRef.current.offsetHeight),{contentWidth:e,contentHeight:t}}},{key:"onResize",value:function(){this.updateLayoutState()}},{key:"updateLayoutState",value:function(){var e=this.getLayoutConfig(),t=e.contentWidth,n=e.contentHeight;this.setState({contentWidth:t,contentHeight:n,screenHeight:window.innerHeight,screenWidth:window.innerWidth})}},{key:"componentDidMount",value:function(){window.addEventListener("resize",this.onResize),this.updateLayoutState()}},{key:"componentDidUpdate",value:function(e,t){}},{key:"render",value:function(){var e=this.state,t=(e.screenWidth,e.screenHeight,e.contentWidth),n=e.contentHeight;return r.a.createElement(d.a,{className:"app"},r.a.createElement(He,{className:"appHeader"},"GNNLens",r.a.createElement("img",{src:g.a,className:"appLogo","alt-text":"logo"})),r.a.createElement(Ae,{className:"appContent"},r.a.createElement("div",{style:{height:"100%",width:"100%"},ref:this.ContentRef},t>0&&n>0?r.a.createElement(Ie,{contentWidth:t,contentHeight:n}):r.a.createElement("div",null)),r.a.createElement("div",{id:"tooltip_proj"}),r.a.createElement("div",{id:"tooltip_matrix"})))}}]),n}(r.a.Component);Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var Ve=n(141),Me={dataset_id:null,refreshnumber:0,showSource:!1,datasetList:[],filters:{},selectedNodeIdList:[],selectedMessagePassingNodeIdList:[],specificNodeIdList:[],select_inspect_node:0,prevGraphJson:null,extendedMode:1,GraphViewSettingsModal_visible:!1,GraphViewState:{DisplayUnfocusedNodes:!1,DisplayOverview:!0},NLabelList:[],eweightList:[],enableForceDirected:!0,NLabelOptions:[],EWeightOptions:[]},Pe=(n(245),n(246),Object(Ve.a)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Me,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"DATASET_ID_CHANGE":return Object(G.a)(Object(G.a)({},e),{},{dataset_id:t.dataset_id});case"INIT_DATASET_LIST":return Object(G.a)(Object(G.a)({},e),{},{datasetList:t.datasetList});case"NLABEL_CHANGE":return Object(G.a)(Object(G.a)({},e),{},{NLabelList:t.NLabelList});case"EWEIGHT_CHANGE":return Object(G.a)(Object(G.a)({},e),{},{eweightList:t.eweightList});case"SELECTED_NODE_ID_LIST_CHANGE":return Object(G.a)(Object(G.a)({},e),{},{selectedNodeIdList:t.selectedNodeIdList});case"SHOW_SOURCE_CHANGE":return Object(G.a)(Object(G.a)({},e),{},{showSource:t.showSource});case"SPECIFIC_NODE_ID_LIST_CHANGE":return Object(G.a)(Object(G.a)({},e),{},{specificNodeIdList:t.specificNodeIdList});case"SELECT_INSPECT_NODE_CHANGE":return Object(G.a)(Object(G.a)({},e),{},{select_inspect_node:t.select_inspect_node});case"CLEAR_ID_INFO":return Object(G.a)(Object(G.a)({},e),{},{filters:{},selectedNodeIdList:[],selectedMessagePassingNodeIdList:[],specificNodeIdList:[],select_inspect_node:0});case"PREV_GRAPH_JSON_CHANGE":return Object(G.a)(Object(G.a)({},e),{},{prevGraphJson:t.prevGraphJson});case"GRAPHVIEWSETTINGMODAL_VISIBLE_CHANGE":return Object(G.a)(Object(G.a)({},e),{},{GraphViewSettingsModal_visible:t.GraphViewSettingsModal_visible});case"GRAPHVIEWSTATE_CHANGE":return Object(G.a)(Object(G.a)({},e),{},{GraphViewState:t.GraphViewState});case"EXTENDED_MODE_CHANGE":return Object(G.a)(Object(G.a)({},e),{},{extendedMode:t.extendedMode});case"ENABLE_FORCE_DIRECTED_CHANGE":return Object(G.a)(Object(G.a)({},e),{},{enableForceDirected:t.enableForceDirected});case"NLABEL_OPTIONS_CHANGE":return Object(G.a)(Object(G.a)({},e),{},{NLabelOptions:t.NLabelOptions});case"EWEIGHT_OPTIONS_CHANGE":return Object(G.a)(Object(G.a)({},e),{},{EWeightOptions:t.EWeightOptions});default:return e}})));i.a.render(r.a.createElement(j.a,{store:Pe},r.a.createElement(We,null)),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))}},[[145,1,2]]]); +//# sourceMappingURL=main.e553e190.chunk.js.map \ No newline at end of file diff --git a/python/gnnlens/visbuild/static/js/main.e553e190.chunk.js.map b/python/gnnlens/visbuild/static/js/main.e553e190.chunk.js.map new file mode 100644 index 0000000..6c8b123 --- /dev/null +++ b/python/gnnlens/visbuild/static/js/main.e553e190.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["components/logo2.png","helper/index.tsx","components/DataRuns/GraphView/GraphViewSettingsModal.tsx","actions/index.tsx","constants/index.tsx","container/GraphViewSettingsModalContainer.tsx","components/DataRuns/GraphView/CanvasDrawing.tsx","components/DataRuns/GraphView/ForceDirectedGraphCanvas.tsx","container/ForceDirectedGraphCanvasContainer.tsx","components/DataRuns/GraphView/GraphView.tsx","components/DataRuns/GraphView/index.tsx","container/GraphViewContainer.tsx","service/dataService.tsx","components/DataRuns/ControlPanel/DataSelector.tsx","container/DataSelectorContainer.tsx","components/DataRuns/ControlPanel/NLabelSelector.tsx","container/NLabelSelectorContainer.tsx","components/DataRuns/ControlPanel/EWeightSelector.tsx","container/EWeightSelectorContainer.tsx","components/DataRuns/ControlPanel/index.tsx","components/DataRuns/ControlPanel/ControlPanel.tsx","container/ControlPanelContainer.tsx","components/DataRuns/index.tsx","components/DataRuns/DataRuns.tsx","container/DataRunsContainer.tsx","components/App.tsx","serviceWorker.ts","reducer/index.tsx","index.tsx"],"names":["module","exports","d3_10color","GREEN","RED","getNodeColor","node_label","color_encode","constructGraphIn","graph_obj","srcs","dsts","num_nodes","skew_weight","weight","range_min","GraphViewSettingsModal","props","handleOk","e","console","log","changeGraphViewSettingsModal_visible","handleCancel","handleUnfocusedNodesChange","checked","target","GraphViewState","changeGraphViewState","DisplayUnfocusedNodes","handleOverviewChange","DisplayOverview","state","this","title","visible","GraphViewSettingsModal_visible","onOk","onCancel","footer","key","type","onClick","onChange","React","changeEnableForceDirected","enableForceDirected","changeShowSource","showSource","changeNLabel","NLabelList","changeEWeight","eweightList","connect","dispatch","state_dict","drawRectStroke","context","x","y","width","height","strokeColor","beginPath","strokeStyle","rect","stroke","drawRect","fillColor","opacity","fillStyle","globalAlpha","fillRect","drawCircleStroke","color","radius","lineWidth","arc","Math","PI","drawCircle","alpha","original_globalAlpha","fill","drawOnePie","startAngle","endAngle","moveTo","closePath","drawNodeGlyph","colorlist","inner_radius","outer_radius","enableStroke","outer_arc_encoded_value","enable_alpha_mode","value","length_model","length","step_angle","current_angle","i","start_angle","end_angle","angle","x1","cos","y1","sin","x2","y2","drawLine","linewidth","lineTo","d3","require","ForceDirectedGraphCanvas","global_simulation","saved_transform","refresh_number","current_graph_json","updateTransform","bind","renderCanvas","prevProps","prevState","graph_json","name","transform","legend_configuration","colorLegend","legend_pie_y","top_svg","select","attr","max_text_length","forEach","d","text","legend_color_width","legend_color_height","legend_color_y","legend_color_svg","legend_rect","selectAll","data","enter","append","merge","row_legend_color","g_row_legend_color","exit","remove","UpdateCurrentGraphJson","onNodeClick","nodenum","enabledForceDirected","enable_forceDirected","neighborSet","NeighborSet","configuration","graphWidth","renderLegend","node","getContext","middleCanvas","middle_context","overview_context","eventCanvas","canvasX","canvasY","canvasXRight","canvasYBottom","radius_collision","stop","simulation","forceSimulation","force","forceCenter","forceX","strength","forceY","forceManyBody","forceLink","id","forceCollide","alphaTarget","alphaDecay","calTransform","judgeHoveredFlag","bool","hasOwnProperty","hiddenTooltip","style","zoomIdentity","tempData","event_canvas","mouseCoordinates","order_determine","a","b","hover_cons_a","hover_cons","hover_cons_b","determineSubject","mouse_x","mouse_y","dx","dy","invertX","invertY","newNodeList","nodes","slice","sort","outer_radius_node","handleMouseMove","xy","obj","defaultUpdateFlag","mouse","updateFlag","event_subject","determineEventSubject","selected","target_id","html","neighbor_id","hovered","indexOf","middleCanvasSimulationUpdate","rectInverseTransform","rect_configuration","rect_x","rect_y","rect_width","rect_height","scale","k","pointInverseTransform","point_configuration","point_x","point_y","moveFocalPoint","ori_point","ori_inverse_point","overview_point","overview_inverse_point","new_x","new_y","simulationUpdate","renderContext","links","filter","source","highlight","node_inner_radius","node_radius","node_outer_radius","node_outer_arc_encoded_value","node_weight","node_outer_arc_radius","radius_gap","save","clearRect","translate","restore","graph_bounding_box","minx","miny","maxx","maxy","flag","glyph_outer_radius","margin","calculateGraphBoundingBox","canvasWidth","canvasHeight","bounding_box","leftbound","upperbound","occupyHeight","occupyWidth","xscale","yscale","min","calculateTransform","overview_inverse_rect","overview_bounding_box","view_configuration","rectTransform","rightbound","lowerbound","inverse_transform_rect","transformed_leftbound","transformed_upperbound","transformed_rightbound","transformed_lowerbound","clipwidth","clipheight","rectInverseTransformAndClip","judgeHovered","real_color","on","event","defaultPrevented","call","zoom","scaleExtent","className","xmlns","Option","Select","GraphView","prevGraphJson","onEnableForceDirected","onExtendedModeChange","onChangeSelectInspectNode","node_id","changeSelectInspectNode","changeExtendedMode","color_mode","num_types","label","push","graph_object","model_nlabels","model_eweights","model_nweights","selectedNodeIdList","select_inspect_node","graph_name","ew","selectStr","join","NLabelName","common","bundle_id","graph_in","graph_target","nlabels","source_list","senders","target_list","receivers","node_num","edge_num","eweight","enablePrevGraphLayout","nodes_json","links_json","links_color_json","init_color","edge_weighted","current_eweights","index","nlabel","node_object","Object","keys","eweights","link_color","edge_weight","getColorLegend","num_nlabel_types","subg_name","subgs","selectedEdgeIdList","eids","nweight","selectedNodeOrder","selectedEdgeOrder","new_selectedNodeIdList","nodeId","concat","Array","from","Set","new_node_id","parseInt","subgList","extendedMode","specificNodeIdList","nowreceiver","constructNeighborSet","ForceDirectedWidth","ForceDirectedHeight","constructExtendedSelectedNodeIdList","constructNodeGraphJson","constructEdgeGraphJson","extendedOptions","subg_type_id","overflowX","float","max","size","GraphViewSettingsModalContainer","placeholder","disabled","map","showGraphViewSettingModal","SettingOutlined","selectedNodeLength","totalNodeLength","str","toFixed","getNodeStatisticStr","ForceDirectedGraphCanvasContainer","selectedMessagePassingNodeIdList","changeSpecificNodeIdList","changePrevGraphJson","URL","window","location","origin","axiosInstance1","axios","create","baseURL","headers","URL2","axiosInstance","getDatasetList","url","get","res","status","getModelList","dataset_id","params","getSubgraphList","getGraphInfo","getModelInfo","model_id","getSubgraphInfo","subgraph_id","DataSelector","onDatasetSelectorChange","initDatasetList","datasetList_package","changeDataset","clearIdInfo","disabledDatasetSelector","datasetList","undefined","NLabelSelector","onNLabelSelectorChange","NLabelOptions","disabledNLabelSelector","nlabel_options_indexed","nlabel_object","mode","allowClear","defaultValue","EWeightSelector","onEWeightSelectorChange","EWeightOptions","disabledEWeightSelector","eweight_options_indexed","eweight_object","ControlPanel","DataSelectorContainer","NLabelSelectorContainer","EWeightSelectorContainer","DataRuns","GraphViewRef","ControlPanelRef","onResizeStop","getLayoutConfigWithName","getCurrentLayoutConfig","model","graph","model_list","subg_list","layout_config","screenWidth","screenHeight","setState","getWholeLayoutConfig","innerHeight","innerWidth","m_to_eweights","head","mname","changeNLabelOptions","mlist","m_to_nlabels","model_info","mdata","slist","n_to_subgs","subg_info","sdata","current","offsetWidth","offsetHeight","getGraphBundledData","getModelData","getSubgraphData","contentHeight","contentWidth","layout","nlabel_options","eweight_options","changeEWeightOptions","max_row_num","floor","w","h","static","screenwidth","cols","rowHeight","onLayoutChange","ref","GraphViewContainer","generateGraphView","ControlPanelContainer","generateWholeView","Content","Layout","Header","App","ContentRef","createRef","onResize","updateLayoutState","contentLayout","getLayoutConfig","addEventListener","src","logo","alt-text","DataRunsContainer","Component","Boolean","hostname","match","initial_state","refreshnumber","filters","store","createStore","action","ReactDOM","render","document","getElementById","navigator","serviceWorker","ready","then","registration","unregister"],"mappings":"uFAAAA,EAAO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IAE1B,IvB3DgC,yBuB4D9B,OAAO,2BACF1S,GADL,IAEE0R,cAAeqO,EAAOrO,gBAE1B,IvBtD8C,uCuBuD5C,OAAO,2BACF1R,GADL,IAEEI,+BAAgC2f,EAAO3f,iCAE3C,IvBxD+B,wBuByD7B,OAAO,2BACFJ,GADL,IAEEL,eAAgBogB,EAAOpgB,iBAE3B,IvBnE8B,uBuBoE1B,OAAO,2BACFK,GADL,IAEE6V,aAAckK,EAAOlK,eAE3B,IvB/DsC,+BuBgElC,OAAO,2BACF7V,GADL,IAEEc,oBAAqBif,EAAOjf,sBAElC,IvBpG+B,wBuBqG3B,OAAO,2BACFd,GADL,IAEE+Z,cAAegG,EAAOhG,gBAE5B,IvB/GgC,yBuBgH5B,OAAO,2BACF/Z,GADL,IAEEwa,eAAgBuF,EAAOvF,iBAE7B,QACE,OAAOxa,OCjHfggB,IAASC,OACL,kBAAC,IAAD,CAAUJ,MAAQA,IACd,kBAAC,GAAD,OAEFK,SAASC,eAAe,SF0HxB,kBAAmBC,WACrBA,UAAUC,cAAcC,MAAMC,MAAK,SAAAC,GACjCA,EAAaC,kB","file":"static/js/main.e553e190.chunk.js","sourcesContent":["module.exports = __webpack_public_path__ + \"static/media/logo2.4b8ec5cf.png\";","// Color Helper\n\nconst d3_10color = [\"#1f77b4\", \"#ff7f0e\", \"#2ca02c\", \"#d62728\", \"#9467bd\", \"#8c564b\", \"#e377c2\", \"#7f7f7f\", \"#bcbd22\", \"#17becf\"];\nconst color_brewer1 = [\"#fbb4ae\",\"#b3cde3\", \"#ccebc5\",\"#decbe4\",\"#fed9a6\",\"#ffffcc\",\"#e5d8bd\",\"#fddaec\"];\nconst color_brewer2 = [\"#b3e2cd\",\"#fdcdac\", \"#cbd5e8\", \"#f4cae4\", \"#e6f5c9\", \"#fff2ae\", \"#f1e2cc\", \"#cccccc\"];\nconst COLORS: string[] = [\n \"#1A7AB1\",\n \"#ADC8E6\",\n \"#FF772D\",\n \"#FFB87F\",\n \"#2AA13A\",\n \"#98E090\",\n \"#FF9398\",\n \"#9467B9\",\n \"#C5B0D3\",\n \"#C49B95\",\n \"#E474C0\",\n \"#F7B4D1\",\n \"#BCBC3D\",\n \"#07C1CD\"\n ]\n\nconst GREEN: string[] = [\n \"#498B77\",\n \"#89C2AE\",\n \"#C1D6D3\"\n]\nconst BLUE: string[] = [\n \"#3E97C7\",\n \"#72B3CF\",\n \"#8FCCDD\",\n \"#C8DADE\"\n\n]\nconst ORANGE: string[] = [\n \"#E96206\",\n \"#F79143\",\n \"#F6AD76\",\n \"#F7CEA7\"\n]\nconst PINK: string[] = [\n \"#F6B1C3\",\n \"#F07F93\",\n \"#DE4863\",\n \"#BC0F46\"\n\n]\nconst RED: string[] = [\"#DC143C\"];\nconst YELLOW : string[] = ['#fee08b'];\nconst GRAY: string[] = ['#999999'];\nconst getLinearColor = (ColorList: string[], step:number) => {\n let totalColor = ColorList.length;\n let divide = 1/ (totalColor - 1);\n let location = Math.floor(step / divide);\n if(location == totalColor - 1){\n location = location - 1;\n }\n let offset = step - location * divide;\n let adjusted_offset = offset / divide;\n return getGradientColor(ColorList[location], ColorList[location+1], adjusted_offset);\n}\nconst getGradientColor = (startColor : string,endColor :string,step : number) => {\n let colorRgb = (sColor : string)=>{\n var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;\n var sColor = sColor.toLowerCase();\n if(sColor && reg.test(sColor)){\n if(sColor.length === 4){\n var sColorNew = \"#\";\n for(var i=1; i<4; i+=1){\n sColorNew += sColor.slice(i,i+1).concat(sColor.slice(i,i+1));\n }\n sColor = sColorNew;\n }\n var sColorChange = [];\n for(var i=1; i<7; i+=2){\n sColorChange.push(parseInt(\"0x\"+sColor.slice(i,i+2)));\n }\n return sColorChange;\n }else{\n return sColor;\n }\n };\n startColor = startColor.replace(/\\s+/g,\"\");\n endColor = endColor.replace(/\\s+/g,\"\");\n let startRGB : any = colorRgb(startColor);//转换为rgb数组模式\n //console.log(startRGB);\n let startR = startRGB[0];\n let startG = startRGB[1];\n let startB = startRGB[2];\n\n let endRGB : any = colorRgb(endColor);\n //console.log(endRGB);\n\n let endR = endRGB[0];\n let endG = endRGB[1];\n let endB = endRGB[2];\n if(step>1){\n console.log(\"out of range step: \", step);\n step = 1;\n }else if(step<0){\n console.log(\"out of range step: \", step);\n step = 0;\n }\n let sR = (endR-startR)*step;//总差值\n let sG = (endG-startG)*step;\n let sB = (endB-startB)*step;\n var R = parseInt((sR+startR));\n var G = parseInt((sG+startG));\n var B = parseInt((sB+startB));\n var strHex = \"#\";\n var aColor = new Array();\n aColor[0] = R;\n aColor[1] = G;\n aColor[2] = B;\n for(let j=0; j<3; j++){\n let hex : string = Number(aColor[j]).toString(16);\n let shex : string = Number(aColor[j])<10 ? '0'+hex :hex;\n if(shex === \"0\"){\n shex += shex;\n }\n strHex += shex;\n }\n return strHex;\n}\n\n\nconst EChartsColor = [\n \"#c23531\",\n \"#2f4554\",\n \"#61a0a8\",\n \"#d48265\",\n \"#91c7ae\",\n \"#749f83\"\n]\n\nconst DefaultColor = BLUE[1];\nconst StartColor = BLUE[0];\nconst EndColor = RED[0];\nconst getNodeColor = ( node_label:number,color_encode:number = 2) =>{\n if(color_encode === 1 || color_encode === 2 || color_encode === 3){\n return d3_10color[node_label];\n }else if(color_encode === 5){\n if(node_label){\n return GREEN[0];\n }else{\n return RED[0];\n }\n }\n \n}\n\n// Transform Data Helper\n\n// Construct Graph In from Graph obj\nfunction constructGraphIn(graph_obj:any){\n let senders = graph_obj.srcs;\n let receivers = graph_obj.dsts;\n let num_nodes = graph_obj.num_nodes;\n return {\n \"senders\":senders,\n \"receivers\":receivers,\n \"num_nodes\":num_nodes\n }\n}\n\n\n// Construct Neighbor Set from Graph in. \nfunction constructNeighborSet(graph_in:any){\n // Input: Graph_in\n // senders: source of edges.\n // receivers: target of edges.\n // node_num: number of nodes.\n // Output: \n // NeighborSet: Dict[Key] <-- incoming neighbors.\n let senders = graph_in.senders;\n let receivers = graph_in.receivers;\n let node_num = graph_in.num_nodes;\n let NeighborSet:any = {};\n for(let i = 0; i nowx){\n xmin = nowx;\n }\n if(xmax < nowx){\n xmax = nowx;\n }\n if(ymin > nowy){\n ymin = nowy;\n }\n if(ymax < nowy){\n ymax = nowy;\n }\n }\n return {\n \"xmin\":xmin,\n \"xmax\":xmax,\n \"ymin\":ymin,\n \"ymax\":ymax\n }\n }\n}\nfunction transform_graphlayout(graph_layout:any[], width:number, height:number){\n if(graph_layout.length === 0){\n return graph_layout;\n }else{\n let bounding_box = get_boundingbox(graph_layout);\n //let canvas_centerx = 300;\n //let canvas_centery = 300;\n //let width = Swidth;\n //let height = Sheight;\n let margin = 20;\n if(graph_layout.length >= 100){\n margin = 20;\n }\n \n let realwidth = width - 2*margin;\n let realheight = height - 2*margin;\n let gap_x = bounding_box[\"xmax\"] - bounding_box[\"xmin\"];\n let gap_y = bounding_box[\"ymax\"] - bounding_box[\"ymin\"];\n if(gap_x === 0){\n gap_x = 1e-16;\n }\n if(gap_y === 0){\n gap_y = 1e-16;\n }\n let realscale = Math.min(realwidth / gap_x, realheight / gap_y);\n let left = margin + (realwidth - realscale * gap_x) / 2;\n let top = margin + (realheight - realscale * gap_y) / 2; \n let xmin = bounding_box[\"xmin\"];\n let ymin = bounding_box[\"ymin\"];\n let new_graph_layout = [];\n for(let i = 0; i< graph_layout.length; i++){\n let nowx = graph_layout[i][0];\n let nowy = graph_layout[i][1];\n let locx = left+ (nowx - xmin) * realscale;\n let locy = top + (nowy - ymin) * realscale;\n new_graph_layout.push([locx,locy]);\n }\n return new_graph_layout;\n }\n}\nfunction skew_weight(weight:any, range_min:any=0.1, range_max:any=1){\n // Assume weight is [0,1]\n return (weight - 0) * 0.9 + range_min;\n}\n\n\n\nexport { RED,YELLOW, EChartsColor, getNodeColor, constructNeighborSet, constructPathDict,getTrainColor, \n compareSelectedNodeIdList,getNodeStatisticStr,constructGraphIn,transform_graphlayout,skew_weight }\n","import * as React from \"react\";\nimport { Modal, Select, Button, Checkbox } from 'antd';\nexport interface IProps {\n GraphViewSettingsModal_visible: any,\n changeGraphViewSettingsModal_visible:any,\n GraphViewState:any,\n changeGraphViewState:any\n}\nexport interface IState {\n}\nexport default class GraphViewSettingsModal extends React.Component{\n constructor(props:IProps) {\n super(props);\n\n this.state = {\n }\n //this.resize.bind(this);\n // Flow:\n // 1. Constructor\n // 2. componentWillMount()\n // 3. render()\n // 4. componentDidMount()\n // If props update:\n // 4.1 componentWillReceiveProps(nextProps : IProps), then goto 5.\n // If States update\n // 5. shouldComponentUpdate() if return false, then no rerendering.\n // 6. if True, then componentWillUpdate\n // 7. render()\n // 8. componentDidUpdate\n // If Unmount, then componentWillUnmount()\n }\n handleOk = (e:any) => {\n console.log(e);\n this.props.changeGraphViewSettingsModal_visible(false);\n };\n \n handleCancel = (e:any) => {\n console.log(e);\n this.props.changeGraphViewSettingsModal_visible(false);\n };\n handleUnfocusedNodesChange = (e:any) =>{\n let checked = e.target.checked;\n let GraphViewState = this.props.GraphViewState;\n this.props.changeGraphViewState({\n ...GraphViewState,\n DisplayUnfocusedNodes: checked\n })\n }\n handleOverviewChange = (e:any) =>{\n let checked = e.target.checked;\n let GraphViewState = this.props.GraphViewState;\n this.props.changeGraphViewState({\n ...GraphViewState,\n DisplayOverview: checked\n })\n }\n public render() {\n /**\n * 1. Show Overview of Graph?\n 2. Show background?\n 3. Show color legend?\n 4. Show glyph legend?\n 5. Extended?\n 6. Max Node Settings?\n */\n let GraphViewState = this.props.GraphViewState;\n return ( \n \n OK\n \n ]}\n >\n \n Rendering Options:\n
\n Display unfocused nodes.\n
\n Display overview.\n
\n \n \n \n )\n }\n}\n\n","import { DATASET_ID_CHANGE, INIT_DATASET_LIST, \n SELECTED_NODE_ID_LIST_CHANGE, \n SHOW_SOURCE_CHANGE, SPECIFIC_NODE_ID_LIST_CHANGE, SELECT_INSPECT_NODE_CHANGE,\n CLEAR_ID_INFO, PREV_GRAPH_JSON_CHANGE, EXTENDED_MODE_CHANGE, GRAPHVIEWSETTINGMODAL_VISIBLE_CHANGE,GRAPHVIEWSTATE_CHANGE, \n NLABEL_CHANGE, EWEIGHT_CHANGE, ENABLE_FORCE_DIRECTED_CHANGE, \n NLABEL_OPTIONS_CHANGE, EWEIGHT_OPTIONS_CHANGE} from '../constants';\n\nexport const changeDataset = (dataset_id:number | null) =>({\n type: DATASET_ID_CHANGE,\n dataset_id: dataset_id\n})\n\nexport const changeSelectedNodeIdList = (selectedNodeIdList: any) =>({\n type: SELECTED_NODE_ID_LIST_CHANGE,\n selectedNodeIdList: selectedNodeIdList\n})\nexport const changeExtendedMode = (extendedMode: number) =>({\n type: EXTENDED_MODE_CHANGE,\n extendedMode: extendedMode\n})\nexport const changeGraphViewSettingsModal_visible = (visible:boolean) =>({\n type: GRAPHVIEWSETTINGMODAL_VISIBLE_CHANGE,\n GraphViewSettingsModal_visible: visible\n})\nexport const changeGraphViewState = (state_dict:any) =>({\n type: GRAPHVIEWSTATE_CHANGE,\n GraphViewState: state_dict\n})\nexport const changeEnableForceDirected = (enableForceDirected:any) =>({\n type: ENABLE_FORCE_DIRECTED_CHANGE,\n enableForceDirected: enableForceDirected\n})\n\n\nexport const changeSpecificNodeIdList = (specificNodeIdList: any) =>({\n type: SPECIFIC_NODE_ID_LIST_CHANGE,\n specificNodeIdList: specificNodeIdList\n})\n\nexport const changeSelectInspectNode = (select_inspect_node:any)=>({\n type: SELECT_INSPECT_NODE_CHANGE,\n select_inspect_node: select_inspect_node\n})\n\nexport const changeShowSource = (showSource: boolean) =>({\n type: SHOW_SOURCE_CHANGE,\n showSource: showSource\n})\nexport const changePrevGraphJson = (prevGraphJson: any) =>({\n type: PREV_GRAPH_JSON_CHANGE,\n prevGraphJson: prevGraphJson\n})\n\nexport const clearIdInfo = () =>({\n type: CLEAR_ID_INFO\n})\n\nexport const initDatasetList = (datasetList:any) =>({\n type: INIT_DATASET_LIST,\n datasetList: datasetList\n})\n\nexport const changeNLabelOptions = (NLabelOptions: any) =>({\n type: NLABEL_OPTIONS_CHANGE,\n NLabelOptions: NLabelOptions\n})\n\nexport const changeEWeightOptions = (EWeightOptions: any) =>({\n type: EWEIGHT_OPTIONS_CHANGE,\n EWeightOptions: EWeightOptions\n})\n\nexport const changeNLabel = (NLabelList: any) =>({\n type: NLABEL_CHANGE,\n NLabelList: NLabelList\n})\n\nexport const changeEWeight = (eweightList: any) =>({\n type: EWEIGHT_CHANGE,\n eweightList: eweightList\n})\n\n","export const DATASET_ID_CHANGE = \"DATASET_ID_CHANGE\";\nexport type DATASET_ID_CHANGE = typeof DATASET_ID_CHANGE;\n\nexport const INIT_DATASET_LIST = \"INIT_DATASET_LIST\";\nexport type INIT_DATASET_LIST = typeof INIT_DATASET_LIST;\n\nexport const EWEIGHT_CHANGE = \"EWEIGHT_CHANGE\";\nexport type EWEIGHT_CHANGE = typeof EWEIGHT_CHANGE;\n\nexport const EWEIGHT_OPTIONS_CHANGE = \"EWEIGHT_OPTIONS_CHANGE\";\nexport type EWEIGHT_OPTIONS_CHANGE = typeof EWEIGHT_OPTIONS_CHANGE;\n\nexport const NLABEL_CHANGE = \"NLABEL_CHANGE\";\nexport type NLABEL_CHANGE = typeof NLABEL_CHANGE;\n\nexport const NLABEL_OPTIONS_CHANGE = \"NLABEL_OPTIONS_CHANGE\";\nexport type NLABEL_OPTIONS_CHANGE = typeof NLABEL_OPTIONS_CHANGE;\n\nexport const SELECTED_NODE_ID_LIST_CHANGE = \"SELECTED_NODE_ID_LIST_CHANGE\";\nexport type SELECTED_NODE_ID_LIST_CHANGE = typeof SELECTED_NODE_ID_LIST_CHANGE;\n\nexport const SHOW_SOURCE_CHANGE = \"SHOW_SOURCE_CHANGE\";\nexport type SHOW_SOURCE_CHANGE = typeof SHOW_SOURCE_CHANGE;\n\nexport const SPECIFIC_NODE_ID_LIST_CHANGE = \"SPECIFIC_NODE_ID_LIST_CHANGE\";\nexport type SPECIFIC_NODE_ID_LIST_CHANGE = typeof SPECIFIC_NODE_ID_LIST_CHANGE;\n\n\nexport const SELECT_INSPECT_NODE_CHANGE = \"SELECT_INSPECT_NODE_CHANGE\";\nexport type SELECT_INSPECT_NODE_CHANGE = typeof SELECT_INSPECT_NODE_CHANGE;\n\nexport const PREV_GRAPH_JSON_CHANGE = \"PREV_GRAPH_JSON_CHANGE\";\nexport type PREV_GRAPH_JSON_CHANGE = typeof PREV_GRAPH_JSON_CHANGE;\n\n\nexport const CLEAR_ID_INFO = \"CLEAR_ID_INFO\";\nexport type CLEAR_ID_INFO = typeof CLEAR_ID_INFO;\n\nexport const EXTENDED_MODE_CHANGE = \"EXTENDED_MODE_CHANGE\";\nexport type EXTENDED_MODE_CHANGE = typeof EXTENDED_MODE_CHANGE;\n\nexport const GRAPHVIEWSETTINGMODAL_VISIBLE_CHANGE = \"GRAPHVIEWSETTINGMODAL_VISIBLE_CHANGE\";\nexport type GRAPHVIEWSETTINGMODAL_VISIBLE_CHANGE = typeof GRAPHVIEWSETTINGMODAL_VISIBLE_CHANGE;\n\nexport const GRAPHVIEWSTATE_CHANGE = \"GRAPHVIEWSTATE_CHANGE\";\nexport type GRAPHVIEWSTATE_CHANGE = typeof GRAPHVIEWSTATE_CHANGE;\n\nexport const ENABLE_FORCE_DIRECTED_CHANGE = \"ENABLE_FORCE_DIRECTED_CHANGE\";\nexport type ENABLE_FORCE_DIRECTED_CHANGE = typeof ENABLE_FORCE_DIRECTED_CHANGE;\n\n\n/*// 定义增加 state 类型常量\nexport const INCREMENT = \"INCREMENT\";\nexport type INCREMENT = typeof INCREMENT;\n\n// 定义减少 state 类型常量\nexport const DECREMENT = \"DECREMENT\";\nexport type DECREMENT = typeof DECREMENT;\n*/","import { connect } from 'react-redux';\nimport { Dispatch } from 'redux';\nimport { StoreState } from '../types';\nimport GraphViewSettingsModal from '../components/DataRuns/GraphView/GraphViewSettingsModal';\nimport { changeGraphViewSettingsModal_visible,changeGraphViewState } from '../actions';\n\nconst mapStateToProps = (state: StoreState) => ({\n GraphViewSettingsModal_visible: state.GraphViewSettingsModal_visible,\n GraphViewState: state.GraphViewState\n})\n\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n changeGraphViewSettingsModal_visible: (visible:boolean) => dispatch(changeGraphViewSettingsModal_visible(visible)),\n changeGraphViewState: (state_dict:any) => dispatch(changeGraphViewState(state_dict))\n})\n\nexport default connect(mapStateToProps, mapDispatchToProps)(GraphViewSettingsModal);\n\n\n\n","import { color } from \"d3\";\n\n// Canvas Handle Function\nfunction drawRectStroke(context:any, x:any, y:any, width:any, height:any, strokeColor:any=\"#bbb\"){\n context.beginPath();\n context.strokeStyle = strokeColor;\n context.rect(x, y, width, height);\n context.stroke();\n}\nfunction drawRect(context:any, x:any, y:any, width:any, height:any, fillColor:any=\"#fff\", opacity:any=0.8){\n context.fillStyle = fillColor;\n context.globalAlpha = opacity;\n context.fillRect(x, y, width, height);\n context.globalAlpha = 1.0;\n}\nfunction drawCircleStroke(context:any, color:any, radius:any, x:any, y:any, lineWidth:number){\n context.lineWidth = lineWidth\n context.strokeStyle = color;\n context.beginPath();\n context.arc(x, y, radius, 0, 2 * Math.PI, true);\n context.stroke();\n}\n\nfunction drawCircle(context:any, color:any, radius:any, x:any, y:any, alpha:any=1){\n let original_globalAlpha = context.globalAlpha;\n context.globalAlpha = alpha;\n context.beginPath();\n context.arc(x, y, radius, 0, 2 * Math.PI, true);\n context.fillStyle = color;\n context.fill();\n context.globalAlpha = original_globalAlpha;\n\n}\n\nfunction drawOnePie(context:any, color:any, radius:any, x:any, y:any, startAngle:any, endAngle:any, alpha:any=1){\n let original_globalAlpha = context.globalAlpha;\n context.globalAlpha = alpha;\n context.beginPath();\n context.moveTo(x,y);\n context.arc(x, y, radius, startAngle, endAngle);\n context.fillStyle = color;\n context.closePath();\n context.fill();\n context.globalAlpha = original_globalAlpha;\n\n}\nfunction drawOneArc(context:any, color:any, radius:any, x:any, y:any, startAngle:any, endAngle:any){\n context.moveTo(x,y);\n context.beginPath();\n context.arc(x, y, radius, startAngle, endAngle);\n context.strokeStyle = color;\n context.stroke();\n}\n/*\n//Backup version\nfunction drawNodeGlyph(context:any, colorlist:any, inner_radius:any, radius:any, outer_radius:any, x:any, y:any, enableStroke:boolean=false){\n \n drawCircle(context, colorlist[4], outer_radius, x, y);\n if(enableStroke){\n drawCircleStroke(context, \"#000\", outer_radius, x, y, 2);\n }\n drawOnePie(context, colorlist[1], outer_radius, x, y, (-150)/180*Math.PI, (-30)/180*Math.PI);\n drawOnePie(context, colorlist[2], outer_radius, x, y, (-30)/180*Math.PI, (+90)/180*Math.PI);\n drawOnePie(context, colorlist[3], outer_radius, x, y, (+90)/180*Math.PI, (+210)/180*Math.PI);\n for(let i = 0; i<3; i++){\n let angle = (-150+120*i)/180*Math.PI;\n let x1 = x + radius*Math.cos(angle);\n let y1 = y + radius*Math.sin(angle);\n let x2 = x + outer_radius*Math.cos(angle);\n let y2 = y + outer_radius*Math.sin(angle);\n // drawLine(context, \"#ddd\", x1, y1, x2 ,y2, 0.5);\n drawLine(context, colorlist[4], x1, y1, x2 ,y2, radius-inner_radius);\n }\n drawCircle(context, colorlist[4], radius, x, y);\n drawCircle(context, colorlist[0], inner_radius, x, y);\n}*/\n\n/*\nfunction drawNodeGlyph(context:any, colorlist:any, inner_radius:any, radius:any, outer_radius:any, x:any, y:any, \n enableStroke:boolean=false, outer_arc_encoded_value:any=0.5, outer_arc_radius:any=2, enable_alpha_mode=true){\n let value = outer_arc_encoded_value;\n //let original_globalAlpha = context.globalAlpha;\n if(value<0) value = 0;\n else if(value>1) value = 1;\n let alpha = 1;\n if(enable_alpha_mode){\n alpha = value;\n }\n \n //context.globalAlpha = value;\n drawCircle(context, colorlist[4], outer_radius, x, y, alpha);\n if(enableStroke){\n drawCircleStroke(context, \"#000\", outer_radius, x, y, 2);\n }\n \n drawOnePie(context, colorlist[1], outer_radius, x, y, (-150)/180*Math.PI, (-30)/180*Math.PI, alpha);\n drawOnePie(context, colorlist[2], outer_radius, x, y, (-30)/180*Math.PI, (+90)/180*Math.PI, alpha);\n drawOnePie(context, colorlist[3], outer_radius, x, y, (+90)/180*Math.PI, (+210)/180*Math.PI, alpha);\n for(let i = 0; i<3; i++){\n let angle = (-150+120*i)/180*Math.PI;\n let x1 = x + radius*Math.cos(angle);\n let y1 = y + radius*Math.sin(angle);\n let x2 = x + outer_radius*Math.cos(angle);\n let y2 = y + outer_radius*Math.sin(angle);\n // drawLine(context, \"#ddd\", x1, y1, x2 ,y2, 0.5);\n drawLine(context, colorlist[4], x1, y1, x2 ,y2, radius-inner_radius, alpha);\n }\n drawCircle(context, colorlist[4], radius, x, y, alpha);\n drawCircle(context, colorlist[0], inner_radius, x, y, alpha);\n //context.globalAlpha = original_globalAlpha;\n\n //let degree = 360 * value - 90;\n //drawOneArc(context, colorlist[5], outer_arc_radius, x, y, (-90)/180*Math.PI, degree/180*Math.PI);\n}\n\nfunction drawNodeGlyph_v1(context:any, colorlist:any, inner_radius:any, radius:any, outer_radius:any, x:any, y:any, \n enableStroke:boolean=false, outer_arc_encoded_value:any=0.5, outer_arc_radius:any=2, enable_alpha_mode=true){\n let value = outer_arc_encoded_value;\n if(value<0) value = 0;\n else if(value>1) value = 1;\n let alpha = 1;\n if(enable_alpha_mode){\n alpha = value;\n }\n if(enableStroke){\n drawCircleStroke(context, \"#000\", outer_radius, x, y, 2);\n }\n drawCircle(context, colorlist[0], outer_radius, x, y, alpha);\n}\nfunction drawNodeGlyph(context:any, colorlist:any, inner_radius:any, radius:any, outer_radius:any, x:any, y:any, \n enableStroke:boolean=false, outer_arc_encoded_value:any=0.5, outer_arc_radius:any=2, enable_alpha_mode=true){\n let value = outer_arc_encoded_value;\n //let original_globalAlpha = context.globalAlpha;\n if(value<0) value = 0;\n else if(value>1) value = 1;\n let alpha = 1;\n if(enable_alpha_mode){\n alpha = value;\n }\n \n //context.globalAlpha = value;\n // Background circle\n \n \n \n // Pie chart drawing\n let length_model = colorlist.length - 1;\n if(length_model > 0){\n drawCircle(context, \"#fff\", outer_radius, x, y, alpha);\n if(enableStroke){\n drawCircleStroke(context, \"#000\", outer_radius, x, y, 2);\n }\n let step_angle = 360 / length_model;\n let current_angle = -90 - step_angle / 2; \n for(let i = 1; i 1){\n current_angle = -90 - step_angle / 2;\n for(let i = 1; i1) value = 1;\n let alpha = 1;\n if(enable_alpha_mode){\n alpha = value;\n }\n \n //context.globalAlpha = value;\n // Background circle\n \n \n \n // Pie chart drawing\n let length_model = colorlist.length - 1;\n if(length_model > 0){\n drawCircle(context, \"#fff\", outer_radius, x, y, alpha);\n if(enableStroke){\n drawCircleStroke(context, \"#000\", outer_radius, x, y, 2);\n }\n let step_angle = 360 / length_model;\n let current_angle = -90 - step_angle / 2; \n for(let i = 1; i 1){\n current_angle = -90 - step_angle / 2;\n for(let i = 1; i1) value = 1;\n context.globalAlpha = value;\n context.strokeStyle = color;\n if(linewidth){\n context.lineWidth = linewidth;\n }\n context.beginPath();\n context.moveTo(x1, y1);\n context.lineTo(x2, y2);\n context.stroke();\n context.globalAlpha = original_globalAlpha;\n}\n\nexport {drawRectStroke, drawRect, drawCircleStroke, \n drawCircle, drawOnePie, drawOneArc, drawNodeGlyph, drawLine }\n","\nimport './ForceDirectedGraphCanvas.css'\nimport * as React from \"react\";\nimport {drawRectStroke, drawRect, drawNodeGlyph, drawLine} from './CanvasDrawing';\nconst d3 = require(\"d3\");\n\nexport interface IProps {\n graph_json : any,\n width : number,\n height : number,\n onNodeClick: any,\n GraphViewState:any,\n UpdateCurrentGraphJson:any\n}\nexport interface IState {\n}\n\nexport default class ForceDirectedGraphCanvas extends React.Component{\n public global_simulation:any = null;\n public saved_transform:any = null;\n public refresh_number = 0;\n public current_graph_json:any = null;\n constructor(props:IProps) {\n super(props);\n this.updateTransform = this.updateTransform.bind(this);\n this.state = {\n\n }\n }\n componentDidMount(){\n this.renderCanvas();\n }\n \n componentDidUpdate(prevProps:IProps, prevState:IState) {\n if(prevProps.graph_json.name !== this.props.graph_json.name || prevProps.width !== this.props.width || prevProps.GraphViewState !== this.props.GraphViewState){\n this.renderCanvas();\n }\n }\n public updateTransform(transform:any){\n this.saved_transform = transform;\n }\n // Render Legend Function.\n public renderLegend(legend_configuration:any){\n var width = legend_configuration[\"width\"];\n var height = legend_configuration[\"height\"];\n var colorLegend = legend_configuration[\"colorLegend\"];\n // ---------------- Color Legend -------------------------//\n let legend_pie_y = height - 10 - 100;\n var top_svg = d3.select(\"#force_directed_graph\")\n .select(\"#svgChart\")\n .attr(\"width\", width)\n .attr(\"height\", height);\n let legend_color_x = 10;\n let max_text_length = 0;\n colorLegend.forEach((d:any)=>{\n let text = \"\" + d.text;\n if(text.length>max_text_length){\n max_text_length = text.length;\n }\n })\n\n let legend_color_width = max_text_length*8+24;\n //console.log(\"maxtextlength\", max_text_length, legend_color_width);\n let legend_color_height = colorLegend.length*20;\n let legend_color_y = legend_pie_y - legend_color_height - 10;\n var legend_color_svg = top_svg.select(\"#ForceDirectedColorLegend\")\n .attr(\"width\", legend_color_width)\n .attr(\"height\", legend_color_height)\n .attr(\"transform\", \"translate(\"+legend_color_x+\",\"+legend_color_y+\")\")\n let legend_rect = legend_color_svg.selectAll(\"rect\").data([0]);\n let legend_rect_enter = legend_rect.enter().append(\"rect\");\n //console.log(\"legend_rect\", legend_rect);\n legend_rect_enter.merge(legend_rect)\n .attr(\"x\", 0)\n .attr(\"y\", 0)\n .attr(\"width\", legend_color_width)\n .attr(\"height\", legend_color_height)\n .attr(\"fill\", \"#fff\")\n .attr(\"opacity\", 0.8)\n .attr(\"stroke\", \"#bbb\")\n .attr(\"stroke-width\", 1)\n .attr(\"rx\",3)\n .attr(\"ry\",3);\n let row_legend_color = legend_color_svg.selectAll(\"g.legend_row_color\")\n .data(colorLegend, function(d:any,i:any){\n return d.text+\"_\"+i+\"_\"+d.color;\n });\n let g_row_legend_color = row_legend_color.enter().append(\"g\")\n .attr(\"class\",\"legend_row_color\")\n .attr(\"transform\", function(d:any,i:any){\n return \"translate(10,\"+(10+i*20)+\")\";\n });\n g_row_legend_color.append(\"circle\")\n .attr(\"r\", 5)\n .attr(\"fill\", function(d:any){\n return d.color;\n })\n \n g_row_legend_color.append(\"text\")\n .attr(\"x\", 10)\n .attr(\"y\", 5)\n .text(function(d:any){\n return d.text;\n })\n \n row_legend_color.exit().remove();\n\n // ---------------- Edge Color Legend -------------------------//\n // let legend_edge_color_x = 10;\n // let legend_edge_color_width = 38;\n // let legend_edge_color_height = 100;\n // let legend_edge_color_y = legend_pie_y - legend_color_height - legend_edge_color_height - 20;\n // var legend_edge_color_svg = top_svg.select(\"#ForceDirectedEdgeColorLegend\")\n // .attr(\"width\", legend_edge_color_width)\n // .attr(\"height\", legend_edge_color_height)\n // .attr(\"transform\", \"translate(\"+legend_edge_color_x+\",\"+legend_edge_color_y+\")\");\n // let legend_edge_rect = legend_edge_color_svg.selectAll(\"rect\").data([0]);\n // let legend_edge_rect_enter = legend_edge_rect.enter().append(\"rect\");\n // console.log(\"legend_rect\", legend_rect);\n // legend_edge_rect_enter.merge(legend_edge_rect)\n // .attr(\"x\", 0)\n // .attr(\"y\", 0)\n // .attr(\"width\", legend_edge_color_width)\n // .attr(\"height\", legend_edge_color_height)\n // .attr(\"fill\", \"#fff\")\n // .attr(\"opacity\", 1)\n // .attr(\"stroke\", \"#bbb\")\n // .attr(\"stroke-width\", 1)\n // .attr(\"rx\",3)\n // .attr(\"ry\",3);\n // Create the svg:defs element and the main gradient definition.\n // var svgDefs = legend_edge_color_svg.selectAll(\"defs\").data([0]);\n\n // var svgDefs_enter = svgDefs.enter().append('defs');\n\n // var mainGradient = svgDefs_enter.append('linearGradient')\n // .attr('id', 'mainGradient')\n // .attr(\"gradientTransform\",\"rotate(90)\");\n\n // Create the stops of the main gradient. Each stop will be assigned\n // a class to style the stop using CSS.\n // mainGradient.append('stop')\n // .attr('stop-color', \"rgba(187, 187, 187 ,1)\")\n // .attr('offset', '0');\n\n // mainGradient.append('stop')\n // .attr('stop-color', 'rgba(187, 187, 187 ,0.1)')\n // .attr('offset', '1');\n // let g_legend_edge_color = legend_edge_color_svg.selectAll(\"g.legend_edge_color\").data([0]);\n // let g_legend_edge_color_enter = g_legend_edge_color.enter().append(\"g\").attr(\"class\",\"legend_edge_color\");\n // let rect_legend_edge_color_enter = g_legend_edge_color_enter.append(\"rect\");\n // let rect_legend_edge_color = g_legend_edge_color.select(\"rect\");\n //let colorGradient = d3.scaleSequential(d3.interpolateRdYlGn);\n // let top_padding = 20;\n // let padding = 5;\n // let text_width = 10;\n // let rect_width = legend_edge_color_width-2*padding-text_width;\n // let rect_height = legend_edge_color_height-2*padding - top_padding;\n // rect_legend_edge_color_enter.merge(rect_legend_edge_color)\n // .attr(\"x\", padding)\n // .attr(\"y\", top_padding + padding)\n // .attr(\"width\", rect_width)\n // .attr(\"height\", rect_height)\n // .attr(\"fill\",\"url(#mainGradient)\");\n // let legend_text_list = [\n // {\n // \"text\":\"1\",\n // \"x\":padding + rect_width,\n // \"y\":top_padding + padding,\n // \"dx\":\".02em\",\n // \"dy\":\".65em\",\n // \"text-anchor\":\"start\"\n // },\n // {\n // \"text\":\"0\",\n // \"x\":padding + rect_width,\n // \"y\":top_padding + padding + rect_height,\n // \"dx\":\".02em\",\n // \"dy\":\".05em\",\n // \"text-anchor\":\"start\"\n // },\n // {\n // \"text\":\"Edge\",\n // \"x\":padding,\n // \"y\":padding,\n // \"dx\":\".00em\",\n // \"dy\":\".65em\",\n // \"text-anchor\":\"start\"\n // }];\n // let legend_text_update = g_legend_edge_color_enter.selectAll(\"text\").data(legend_text_list, function(d:any){\n // return d.text;\n // });\n // let legend_text_enter = legend_text_update.enter().append(\"text\");\n \n // legend_text_update.merge(legend_text_enter)\n // .attr(\"x\", (d:any)=>d.x)\n // .attr(\"y\", (d:any)=>d.y)\n // .attr(\"dx\", (d:any)=>d.dx)\n // .attr(\"dy\", (d:any)=>d.dy)\n // .attr(\"text-anchor\",(d:any)=>d[\"text-anchor\"])\n // .text((d:any)=>{\n // return d.text;\n // });\n // let legend_title = g_legend_edge_color.exit().remove(); \n }\n // Render Canvas Main Function\n public renderCanvas(){\n\n // initialize \n this.props.UpdateCurrentGraphJson(this.props.graph_json);\n var onNodeClick = this.props.onNodeClick;\n var nodenum = this.props.graph_json.nodenum;\n var enabledForceDirected = this.props.graph_json.enable_forceDirected;\n var neighborSet = this.props.graph_json.NeighborSet;\n var colorLegend = this.props.graph_json.colorLegend;\n var configuration = {\n \"strength\": 0.01,\n \"radius\":15,\n \"showlabel\": true,\n \"showarrow\": true,\n \"width\": this.props.width,\n \"height\": this.props.height\n }\n var GraphViewState = this.props.GraphViewState;\n var DisplayUnfocusedNodes = GraphViewState.DisplayUnfocusedNodes;\n var DisplayOverview = GraphViewState.DisplayOverview;\n //console.log(\"ForceDirected\" , nodenum)\n if(nodenum >= 100){\n configuration = {\n \"strength\": 0.4,\n \"radius\":3,\n \"showlabel\": false,\n \"showarrow\": false,\n \"width\": this.props.width,\n \"height\": this.props.height\n }\n }\n\n var width = configuration[\"width\"];\n var height = configuration[\"height\"];\n var radius = configuration[\"radius\"];\n var radius_gap = 0.3;\n var graphWidth = this.props.width;\n var legend_configuration:any = {\n \"width\":width,\n \"height\":height,\n \"colorLegend\":colorLegend,\n }\n // Render Legend\n this.renderLegend(legend_configuration);\n\n // Layered Canvas\n // Detect Event -- Capture Event\n // Overview Canvas -- Display Overview\n // Hovered Canvas -- Hovered Canvas (will not modify the bottom canvas when hovering)\n // Bottom Canvas -- Bottom Canvas\n\n\n // 1. Original Canvas\n var graphCanvas = d3.select('#force_directed_graph').select('#bottom')\n .attr('width', graphWidth + 'px')\n .attr('height', height + 'px')\n .node();\n \n var context = graphCanvas.getContext('2d');\n\n // 2. Hovered Canvas\n var middleCanvas = d3.select('#force_directed_graph').select(\"#middle\")\n .attr('width', graphWidth + 'px')\n .attr('height', height + 'px')\n .node();\n var middle_context = middleCanvas.getContext('2d');\n\n // 3. Overview Canvas\n var overviewCanvas = d3.select('#force_directed_graph').select('#overview')\n .attr('width', graphWidth + 'px')\n .attr('height', height + 'px')\n .node();\n var overview_context = overviewCanvas.getContext('2d');\n\n // 4. Detect Event \n var eventCanvas = d3.select('#force_directed_graph').select(\"#event\")\n .attr('width', graphWidth + 'px')\n .attr('height', height + 'px')\n .node();\n /**\n * OverviewCanvas\n */\n let canvasWidth = 100;\n let canvasHeight = 100;\n let margin = 10;\n let canvasX = graphWidth - canvasWidth - margin;\n let canvasY = height - canvasHeight - margin;\n let canvasXRight = canvasX + canvasWidth;\n let canvasYBottom = canvasY + canvasHeight;\n let radius_collision = radius*3 + radius_gap*3;\n\n // Force Directed Layout Algorithm.\n if(this.global_simulation){\n this.global_simulation.stop();\n delete this.global_simulation;\n }\n var simulation = d3.forceSimulation()\n .force(\"center\", d3.forceCenter(graphWidth / 2, height / 2))\n .force(\"x\", d3.forceX(graphWidth / 2).strength(0.1))\n .force(\"y\", d3.forceY(height / 2).strength(0.1))\n .force(\"charge\", d3.forceManyBody().strength(-50))\n .force(\"link\", d3.forceLink().strength(1).id(function(d:any) { return d.id; }))\n .force('collide', d3.forceCollide().radius((d:any) => radius_collision))\n .alphaTarget(0)\n .alphaDecay(0.05)\n \n this.global_simulation = simulation;\n\n let updateTransform = this.updateTransform;\n\n // Transform\n // This transform is preserved. \n var transform:any;\n var calTransform:any={\n \"x\":0,\n \"y\":0,\n \"k\":1\n };\n if(this.saved_transform){\n transform =this.saved_transform ;\n }else{\n transform = d3.zoomIdentity;\n }\n\n \n // Judge the hovered flag.\n function judgeHoveredFlag(d:any, bool:boolean){\n if(!d.hasOwnProperty(\"hovered\") || d[\"hovered\"]===false ){\n if(bool === false){\n return false;\n }else{\n return true;\n }\n }else{\n if(bool === true){\n return false;\n }else{\n return true;\n }\n }\n }\n\n // Hide the tooltip. \n function hiddenTooltip(){\n d3.select(\"#force_directed_graph\").select(\"#tooltip\").style('opacity', 0);\n\n }\n\n // Processed Data. \n let tempData = this.props.graph_json;\n //console.log(\"tempData\", tempData);\n\n let event_canvas = eventCanvas;\n var mouseCoordinates:any = null;\n d3.select(event_canvas).on(\"click\",handleMouseClick).on(\"mousemove\", handleMouseMove).on(\"mouseout\",handleMouseOut);\n d3.select(event_canvas).call(d3.zoom().scaleExtent([1 / 10, 8]).on(\"zoom\", zoomed))\n \n // Control whether using force directed layout. \n // SimulationUpdate is used to render the layout. \n if(enabledForceDirected){\n simulation\n .nodes(tempData.nodes)\n .on(\"tick\", simulationUpdate);\n\n simulation.force(\"link\")\n .links(tempData.links);\n\n }else{\n simulation.stop();\n simulation\n .nodes(tempData.nodes);\n\n simulation.force(\"link\")\n .links(tempData.links);\n simulationUpdate();\n }\n \n \n\n // Determine the clicked ordering.\n function order_determine(a:any,b:any){\n let hover_cons_a = a.hasOwnProperty(\"hover_cons\")?a.hover_cons:1;\n let hover_cons_b = b.hasOwnProperty(\"hover_cons\")?b.hover_cons:1;\n let node_outer_radius_a = a.radius*hover_cons_a*2;\n let node_outer_radius_b = b.radius*hover_cons_b*2;\n return node_outer_radius_a= 0; --i) {\n var node = newNodeList[i];\n if(!DisplayUnfocusedNodes && !node[\"highlight\"]){\n continue;\n }\n dx = x - node.x;\n dy = y - node.y;\n let hover_cons = node.hasOwnProperty(\"hover_cons\")?node.hover_cons:1;\n let outer_radius_node = node.radius * 2 * hover_cons;\n if (dx * dx + dy * dy < outer_radius_node * outer_radius_node) {\n return node;\n }\n }\n return null;\n }\n \n\n\n // Zoom updating. \n function zoomed(this:any) {\n var xy = d3.mouse(this);\n mouseCoordinates = xy;\n transform = d3.event.transform;\n if(determineEventSubject(xy[0], xy[1])===\"GraphCanvas\"){\n updateTransform(transform);\n simulationUpdate();\n }\n }\n \n // Mouse Move Handler. \n // Use middleCanvasSimulationUpdate() to update the hovered nodes. \n function handleMouseMove(this:any, obj:any=null, defaultUpdateFlag:boolean=false){\n var xy:any;\n if(obj){\n xy = mouseCoordinates;\n }else{\n xy = d3.mouse(this);\n mouseCoordinates = xy;\n }\n \n var updateFlag = defaultUpdateFlag;\n\n if(xy){\n let event_subject = determineEventSubject(xy[0], xy[1]);\n var selected = determineSubject(xy[0],xy[1]);\n if(event_subject===\"GraphCanvas\"&&selected){\n updateFlag = true;\n let target_id = selected.id;\n\n d3.select(\"#force_directed_graph\").select('#tooltip')\n .style('opacity', 0.8)\n .style('top', (xy[1] + 5) + 'px')\n .style('left', (xy[0] + 5) + 'px')\n .html(target_id);\n\n let neighbor_id = neighborSet[selected.id];\n tempData.nodes.forEach((d:any)=>{\n if(target_id === d.id){\n d.hovered = true;\n d.hover_cons = 3;\n }else if(neighbor_id.indexOf(d.id)>=0){\n d.hovered = true;\n d.hover_cons = 2;\n }else{ \n d.hovered = false;\n d.hover_cons = 1;\n }\n })\n \n }else{\n tempData.nodes.forEach((d:any)=>{\n updateFlag = updateFlag || judgeHoveredFlag(d, false);\n d.hovered = false;\n d.hover_cons = 1;\n })\n hiddenTooltip();\n }\n }else{\n tempData.nodes.forEach((d:any)=>{\n updateFlag = updateFlag || judgeHoveredFlag(d, false);\n d.hovered = false;\n d.hover_cons = 1;\n })\n hiddenTooltip();\n }\n \n if(updateFlag){\n middleCanvasSimulationUpdate()\n }\n \n }\n\n // Mouse Out handler. \n function handleMouseOut(this:any, obj:any=null, defaultUpdateFlag:boolean=false){\n var updateFlag = defaultUpdateFlag;\n mouseCoordinates = null;\n tempData.nodes.forEach((d:any)=>{\n updateFlag = updateFlag || judgeHoveredFlag(d, false);\n d.hovered = false;\n d.hover_cons = 1;\n })\n hiddenTooltip();\n if(updateFlag){\n middleCanvasSimulationUpdate()\n }\n }\n\n // Determine the clicked canvas. \n function determineEventSubject(mouse_x:number, mouse_y:number){\n if(mouse_x >= canvasX && mouse_x <=canvasXRight \n && mouse_y >= canvasY && mouse_y <=canvasYBottom && DisplayOverview){\n return \"OverviewCanvas\";\n }else{\n return \"GraphCanvas\";\n }\n }\n // Mouse Click Handler.\n function handleMouseClick(this:any, obj:any=null, defaultUpdateFlag:boolean=false){\n if (d3.event.defaultPrevented) return; // zoomed\n\n var xy:any;\n if(obj){\n xy = mouseCoordinates;\n }else{\n xy = d3.mouse(this);\n mouseCoordinates = xy;\n }\n\n if(xy){\n if(determineEventSubject(xy[0],xy[1])===\"OverviewCanvas\"){\n moveFocalPoint(xy[0], xy[1]);\n }else{\n var selected = determineSubject(xy[0],xy[1]);\n if(selected){\n onNodeClick(selected.id);\n }\n }\n\n }else{\n\n }\n \n }\n\n // ---- The following code is reserved for overview canvas calculation. NOT IMPORTANT ---- //\n // Calculate the bounding box of graph.\n function calculateGraphBoundingBox(){\n //let canvasWidth = graphWidth;\n //let canvasHeight = height;\n let minx=0, miny=0, maxx=0, maxy=0;\n let flag = false;\n tempData.nodes.forEach(function(d:any){\n if(DisplayUnfocusedNodes || (!DisplayUnfocusedNodes && d.highlight)){\n let x = d.x;\n let y = d.y;\n if(!flag){\n minx = x;\n miny = y;\n maxx = x;\n maxy = y;\n flag = true;\n }else{\n if(minx > x){\n minx = x;\n }\n if(maxx < x){\n maxx = x;\n }\n if(miny > y){\n miny = y;\n }\n if(maxy < y){\n maxy = y;\n }\n }\n }\n \n })\n let glyph_outer_radius = 3*2;\n let margin = 14;\n let leftbound = minx - glyph_outer_radius - margin;\n let upperbound = miny - glyph_outer_radius - margin;\n \n let occupyWidth = maxx - minx + glyph_outer_radius*2 + margin*2;\n let occupyHeight = maxy - miny + glyph_outer_radius*2 + margin*2;\n return {\n \"leftbound\":leftbound,\n \"upperbound\":upperbound,\n \"occupyWidth\":occupyWidth,\n \"occupyHeight\":occupyHeight\n }\n }\n\n // Calculate the transformed rects.\n function rectTransform(rect_configuration:any, transform:any){\n let rect_x = rect_configuration[\"x\"];\n let rect_y = rect_configuration[\"y\"];\n let rect_width = rect_configuration[\"width\"];\n let rect_height = rect_configuration[\"height\"];\n let dx = transform.x;\n let dy = transform.y;\n let scale = transform.k;\n let x = (rect_x*scale + dx) ;\n let y = (rect_y*scale + dy) ;\n let width = (rect_width) * scale;\n let height = (rect_height) * scale;\n return {\n \"x\":x,\n \"y\":y,\n \"width\":width,\n \"height\":height\n }\n }\n\n // Calculate the inversed transformed rects.\n function rectInverseTransform(rect_configuration:any, transform:any){\n let rect_x = rect_configuration[\"x\"];\n let rect_y = rect_configuration[\"y\"];\n let rect_width = rect_configuration[\"width\"];\n let rect_height = rect_configuration[\"height\"];\n let dx = -transform.x;\n let dy = -transform.y;\n let scale = 1/transform.k;\n let x = (rect_x + dx) * scale;\n let y = (rect_y + dy) * scale;\n let width = (rect_width) * scale;\n let height = (rect_height) * scale;\n return {\n \"x\":x,\n \"y\":y,\n \"width\":width,\n \"height\":height\n }\n }\n\n // Calculate the inversed transformed of points.\n function pointInverseTransform(point_configuration:any, transform:any){\n let point_x = point_configuration[\"x\"];\n let point_y = point_configuration[\"y\"];\n let dx = -transform.x;\n let dy = -transform.y;\n let scale = 1/transform.k;\n let x = (point_x + dx) * scale;\n let y = (point_y + dy) * scale;\n return {\n \"x\":x,\n \"y\":y\n }\n }\n\n // Move the Overview Focused View.\n function moveFocalPoint(mouse_x:number, mouse_y:number){\n let ori_point = {\n \"x\":graphWidth / 2,\n \"y\":height / 2\n }\n let ori_inverse_point = pointInverseTransform(ori_point, transform);\n \n let overview_point = {\n \"x\": mouse_x,\n \"y\": mouse_y\n }\n let overview_inverse_point = pointInverseTransform(overview_point, calTransform);\n let new_x = -(overview_inverse_point[\"x\"] - ori_inverse_point[\"x\"])*transform.k + transform.x;\n let new_y = -(overview_inverse_point[\"y\"] - ori_inverse_point[\"y\"])*transform.k + transform.y;\n console.log({\n ori_point, ori_inverse_point, overview_point, overview_inverse_point, new_x, new_y\n })\n transform.x = new_x;\n transform.y = new_y;\n updateTransform(transform);\n simulationUpdate();\n \n }\n // Calculate the rect in the overview. \n function rectInverseTransformAndClip(rect_configuration:any,transform:any, bounding_box:any){\n let leftbound = bounding_box[\"leftbound\"];\n let upperbound = bounding_box[\"upperbound\"];\n let occupyHeight = bounding_box[\"occupyHeight\"];\n let occupyWidth = bounding_box[\"occupyWidth\"];\n let rightbound = leftbound + occupyWidth;\n let lowerbound = upperbound + occupyHeight;\n let inverse_transform_rect = rectInverseTransform(rect_configuration, transform);\n let transformed_leftbound = inverse_transform_rect[\"x\"];\n let transformed_upperbound = inverse_transform_rect[\"y\"];\n let transformed_rightbound = inverse_transform_rect[\"x\"]+inverse_transform_rect[\"width\"];\n let transformed_lowerbound = inverse_transform_rect[\"y\"]+inverse_transform_rect[\"height\"];\n\n if(transformed_leftboundrightbound){\n transformed_rightbound = rightbound;\n }\n if(transformed_upperboundlowerbound){\n transformed_lowerbound = lowerbound;\n }\n let clipx = transformed_leftbound;\n let clipy = transformed_upperbound;\n let clipwidth = transformed_rightbound - transformed_leftbound;\n let clipheight = transformed_lowerbound - transformed_upperbound;\n if(clipwidth < 0){\n clipwidth = 0;\n }else if(clipwidth>occupyWidth){\n clipwidth = occupyWidth;\n }\n if(clipheight<0){\n clipheight=0;\n }else if(clipheight>occupyHeight){\n clipheight = occupyHeight;\n }\n return {\n \"x\":clipx,\n \"y\":clipy,\n \"width\":clipwidth,\n \"height\":clipheight\n }\n\n }\n function calculateTransform(canvasX:number,canvasY:number,canvasWidth:number, canvasHeight:number, bounding_box:any){\n let leftbound = bounding_box[\"leftbound\"];\n let upperbound = bounding_box[\"upperbound\"];\n let occupyHeight = bounding_box[\"occupyHeight\"];\n let occupyWidth = bounding_box[\"occupyWidth\"];\n let xscale = canvasWidth / occupyWidth;\n let yscale = canvasHeight / occupyHeight;\n let scale = Math.min(xscale, yscale);\n let dx = (canvasWidth - occupyWidth * scale)/2 - leftbound*scale + canvasX;\n let dy = (canvasHeight - occupyHeight * scale)/2 - upperbound*scale + canvasY;\n //console.log(\"canvasWidth, canvasHeight, occupyWidth, occupyHeight\", canvasWidth,canvasHeight, occupyWidth,occupyHeight);\n let calTransform = {\n \"k\": scale,\n \"x\":dx,\n \"y\":dy\n\n }\n return calTransform;\n\n }\n\n\n // ---- The above code is reserved for overview canvas calculation. NOT IMPORTANT ---- //\n\n // 2. Main render function.\n function renderContext(context:any){\n\n\n // Unfocused nodes rendering.\n if(DisplayUnfocusedNodes){\n tempData.links.filter((d:any)=>{\n if(d.source.highlight && d.target.highlight){\n return false;\n }else{\n return true;\n }\n }).forEach(function(d:any) {\n // Draw Line\n drawLine(context, d.color, d.source.x, d.source.y, d.target.x, d.target.y, null, d.weight);\n });\n \n // Draw the nodes\n tempData.nodes.filter((d:any)=>{\n return !d[\"highlight\"];\n }\n ).forEach(function(d:any, i:any) {\n // Draw Node Glyph\n //console.log(\"radius\",d.radius);\n let node_inner_radius = d.radius - radius_gap;\n let node_radius = d.radius;\n let node_outer_radius = d.radius * 2;\n let node_outer_arc_encoded_value = d.node_weight;\n let node_outer_arc_radius = node_outer_radius + radius_gap * 5;\n drawNodeGlyph(context, d.color, node_inner_radius, \n node_radius, node_outer_radius, d.x, d.y, false,\n node_outer_arc_encoded_value, node_outer_arc_radius);\n });\n }\n \n // Focused nodes rendering\n tempData.links.filter((d:any)=>{\n if(d.source.highlight && d.target.highlight){\n return true;\n }else{\n return false;\n }\n }).forEach(function(d:any) {\n drawLine(context, d.color, d.source.x, d.source.y, d.target.x, d.target.y, 5 * d.weight, d.weight);\n });\n tempData.nodes.filter((d:any)=>{\n return d[\"highlight\"];\n \n }).forEach(function(d:any,i:any){\n let node_inner_radius = d.radius - radius_gap;\n let node_radius = d.radius;\n let node_outer_radius = d.radius * 2;\n let node_outer_arc_encoded_value = d.node_weight;\n let node_outer_arc_radius = node_outer_radius + radius_gap * 5;\n drawNodeGlyph(context, d.color, node_inner_radius, \n node_radius, node_outer_radius, d.x, d.y, false,\n node_outer_arc_encoded_value, node_outer_arc_radius);\n\n })\n }\n\n // Main Function for Updating Layout.\n function simulationUpdate(){\n context.save();\n context.clearRect(0, 0, graphWidth, height);\n context.translate(transform.x, transform.y);\n context.scale(transform.k, transform.k);\n renderContext(context);\n context.restore();\n \n //let canvasWidth = 100 * graphWidth / height;\n // ---- The following code is reserved for overview canvas calculation. NOT IMPORTANT ---- //\n\n if(DisplayOverview){\n let graph_bounding_box = calculateGraphBoundingBox();\n calTransform = calculateTransform(canvasX, canvasY, canvasWidth, canvasHeight, graph_bounding_box);\n let rect_configuration = {\n \"x\":0, \"y\":0, \"width\":graphWidth, \"height\":height\n }\n let overview_configuration = {\n \"x\":canvasX,\n \"y\":canvasY,\n \"width\":canvasWidth,\n \"height\":canvasHeight\n }\n let overview_inverse_rect = rectInverseTransform(overview_configuration, calTransform);\n let overview_bounding_box = {\n \"leftbound\":overview_inverse_rect[\"x\"],\n \"upperbound\":overview_inverse_rect[\"y\"],\n \"occupyWidth\":overview_inverse_rect[\"width\"],\n \"occupyHeight\":overview_inverse_rect[\"height\"]\n }\n let view_inverse_configuration = rectInverseTransformAndClip(rect_configuration, transform, overview_bounding_box);\n let view_configuration = rectTransform(view_inverse_configuration, calTransform); \n \n overview_context.save();\n overview_context.clearRect(0, 0, graphWidth, height);\n drawRectStroke(overview_context, canvasX, canvasY, canvasWidth, canvasHeight);\n drawRect(overview_context, canvasX, canvasY, canvasWidth, canvasHeight);\n \n overview_context.translate(calTransform.x, calTransform.y);\n overview_context.scale(calTransform.k, calTransform.k);\n renderContext(overview_context);\n overview_context.scale(1/calTransform.k, 1/calTransform.k);\n overview_context.translate(-calTransform.x, -calTransform.y);\n drawRectStroke(overview_context, view_configuration[\"x\"], view_configuration[\"y\"], view_configuration[\"width\"], view_configuration[\"height\"],\"#000\");\n drawRect(overview_context, view_configuration[\"x\"], view_configuration[\"y\"], view_configuration[\"width\"], view_configuration[\"height\"],\"#ccc\",0.5);\n overview_context.restore();\n \n }\n // ---- The above code is reserved for overview canvas calculation. NOT IMPORTANT ---- //\n\n \n handleMouseMove(middleCanvas, true);\n }\n\n\n // When hovering, changing middle canvas.\n function middleCanvasSimulationUpdate(){\n let judgeHovered = (d:any)=>{\n if(d.hasOwnProperty(\"hovered\") && d[\"hovered\"]){\n return true;\n }else{\n return false;\n }\n }\n middle_context.save();\n \n middle_context.clearRect(0, 0, graphWidth, height);\n middle_context.translate(transform.x, transform.y);\n middle_context.scale(transform.k, transform.k);\n tempData.links.filter((d:any)=>{\n if(judgeHovered(d.source) && judgeHovered(d.target)){\n return true;\n }else{\n return false;\n }\n }).forEach(function(d:any) {\n drawLine(middle_context, d.real_color, d.source.x, d.source.y, d.target.x, d.target.y, null, d.weight);\n });\n // Draw the hovered nodes\n tempData.nodes.filter((d:any)=>{\n return judgeHovered(d);\n }).sort(order_determine).forEach(function(d:any, i:any) {\n let node_inner_radius = d.radius - radius_gap;\n let node_radius = d.radius;\n let node_outer_radius = d.radius * 2;\n let node_outer_arc_encoded_value = d.node_weight;\n let node_outer_arc_radius = node_outer_radius + radius_gap * 5;\n drawNodeGlyph(middle_context, d.real_color, node_inner_radius*d.hover_cons, \n node_radius*d.hover_cons, node_outer_radius*d.hover_cons, d.x, d.y, true, \n node_outer_arc_encoded_value, node_outer_arc_radius*d.hover_cons, false);\n });\n middle_context.restore();\n }\n }\n \n public render() { \n return (\n
\n \n \n \n \n \n\n \n \n\n \n \n
\n \n \n
\n \n\n )\n\n }\n}\n\n","import ForceDirectedGraphCanvas from '../components/DataRuns/GraphView/ForceDirectedGraphCanvas'\nimport { connect } from 'react-redux';\nimport { Dispatch } from 'redux';\n\n//import { decrement, increment } from '../actions';\nimport { StoreState } from '../types';\n\n\n// 将 reducer 中的状态插入到组件的 props 中\nconst mapStateToProps = (state: StoreState) => ({\n GraphViewState: state.GraphViewState\n})\n\n// 将 对应action 插入到组件的 props 中\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n\n})\n\n// 使用 connect 高阶组件对 Counter 进行包裹\nexport default connect(mapStateToProps, mapDispatchToProps)(ForceDirectedGraphCanvas);\n\n\n\n","\nimport * as React from \"react\";\nimport { Select, Button, Tag, InputNumber } from 'antd';\nimport {getNodeColor, constructNeighborSet, getNodeStatisticStr, \n constructGraphIn, skew_weight} from '../../../helper';\nimport { SettingOutlined } from '@ant-design/icons';\nimport GraphViewSettingsModalContainer from '../../../container/GraphViewSettingsModalContainer';\nimport ForceDirectedGraphCanvasContainer from '../../../container/ForceDirectedGraphCanvasContainer';\nconst Option = Select.Option;\n\n\nexport interface IProps {\n // For original graph object\n graph_object:any,\n model_nlabels:any,\n model_eweights:any,\n model_nweights:any,\n NLabelList:any,\n eweightList:any,\n // For subgraphs\n subgs:any,\n subgList:any,\n // For size of view.\n width: number,\n height: number,\n // For displayed nodes.\n selectedNodeIdList:any[],\n // For users selected node.\n changeSelectInspectNode:any,\n select_inspect_node : number,\n changeShowSource:any,\n showSource: boolean,\n // For extended mode. \n extendedMode: any,\n changeExtendedMode:any,\n // For Graph View Setting Modal.\n GraphViewSettingsModal_visible:any,\n changeGraphViewSettingsModal_visible:any,\n\n enableForceDirected: boolean,\n changeEnableForceDirected: any\n}\nexport interface IState {\n\n}\n\nexport default class GraphView extends React.Component{\n public prevGraphJson:any = null;\n constructor(props:IProps) {\n super(props);\n this.onEnableForceDirected = this.onEnableForceDirected.bind(this);\n this.onExtendedModeChange = this.onExtendedModeChange.bind(this);\n this.onNodeClick = this.onNodeClick.bind(this);\n this.onChangeSelectInspectNode = this.onChangeSelectInspectNode.bind(this);\n this.UpdateCurrentGraphJson = this.UpdateCurrentGraphJson.bind(this);\n this.state = {\n }\n // Flow:\n // 1. Constructor\n // 2. componentWillMount()\n // 3. render()\n // 4. componentDidMount()\n // If props update:\n // 4.1 componentWillReceiveProps(nextProps : IProps), then goto 5.\n // If States update\n // 5. shouldComponentUpdate() if return false, then no rerendering.\n // 6. if True, then componentWillUpdate\n // 7. render()\n // 8. componentDidUpdate\n // If Unmount, then componentWillUnmount()\n }\n public UpdateCurrentGraphJson(current_graph_json:any){\n //console.log(\"Store Graph Json.\")\n this.prevGraphJson = current_graph_json;\n }\n // Handling the node click event.\n public onNodeClick(node_id:number){\n let {showSource} = this.props;\n if(showSource === false){\n // select node in graph view and update showSource mode.\n this.props.changeSelectInspectNode(node_id);\n this.props.changeShowSource(true);\n this.props.changeExtendedMode(3);\n }else{\n this.props.changeSelectInspectNode(node_id);\n } \n }\n // Color Legend Info.\n public getColorLegend(color_mode:boolean, num_types:number){\n let label = [];\n if (color_mode) {\n for(let i = 0; i< num_types; i++){\n label.push({\n \"text\":i,\n \"color\":getNodeColor(i,2)\n })\n }\n }\n return label;\n }\n // Data Preprocessing for node subgraph\n // graph_object: original graph object.\n // model_nlabels: record mapping from model names to predicted nlabels\n // model_eweights: record mapping from eweight names to eweight values\n // model_nweights: record mapping from nweight names to nweight values\n // NLabelList: array of nlabel names, e.g. \"ground_truth\", \"GCN\"\n // eweightList: array of attention head names, e.g. \"layer-0-head-1\"\n // selecteedNodeIdList: displayed nodes.\n // enableForceDirected: control whether using force directed layout.\n // select_inspect_node: users selected node id. \n // showSource: current mode on whether showing only selected node. \n // width / height: the size of graph view.\n public constructNodeGraphJson(graph_object:any, model_nlabels:any, model_eweights:any, model_nweights:any, NLabelList:any, eweightList:any, selectedNodeIdList:any, \n enableForceDirected:boolean, select_inspect_node:number, showSource:boolean, width:number, height:number){\n let ew = eweightList;\n let selectStr = selectedNodeIdList.join(\"_\");\n let NLabelName = NLabelList.join(\"_\");\n let common = graph_object;\n \n // 1. Data package fingerprint. \n let graph_name; \n graph_name = common.name+\"_\"+common.bundle_id\n +\"_SELECTED_\"+selectStr+\"_SELECTEDEND_\"\n +\"_NLABEL_\"+NLabelName+\"_NLABELEND_\"\n +\"_EWEIGHT_\"+ew+\"_EWEIGHTEND_\"\n +enableForceDirected+\"_\"+width+\"_\"+height+\"_\";\n let graph_in = constructGraphIn(common);\n let graph_target = common.nlabels;\n // let graph_layout = common.layout;\n let source_list = graph_in.senders;\n let target_list = graph_in.receivers;\n let node_num = graph_in.num_nodes;\n let edge_num = graph_in.senders.length;\n let eweight = model_eweights;\n // let nweight = model_nweights;\n\n // 2. Default to show all nodes.\n if(selectedNodeIdList.length === 0){ \n selectedNodeIdList = []\n for(let i = 0; i 0){\n // new_graph_layout = transform_graphlayout(new_graph_layout, width, height);\n // }\n\n // 4. If we have processed the graph layout, then we use previous graph layout.\n let enablePrevGraphLayout = false;\n let prevGraphJson = this.prevGraphJson;\n if(prevGraphJson && prevGraphJson[\"success\"]){\n if(prevGraphJson[\"nodes\"].length === node_num){\n enablePrevGraphLayout = true;\n }\n }\n //console.log(\"enablePrevGraphLayout, enableForceDirected, prevGraphJson\", enablePrevGraphLayout, enableForceDirected, prevGraphJson);\n // 5. Derive the info of nodes and links.\n let nodes_json = []; // node info\n let links_json = []; // link info\n let links_color_json = []; // link color info\n \n // Prepare properties of nodes.\n let color_mode: boolean = NLabelList.length !== 0;\n // If ground truth is not selected, then we use dummycolor to fill the area of ground truth. \n let dummycolor = \"#aaa\";\n let init_color:any = [];\n if (!color_mode) {\n init_color = [dummycolor];\n }\n for(let i = 0; i{\n if(d === \"ground_truth\"){\n let nlabel = graph_target[index];\n color.push(getNodeColor(nlabel, 2));\n }else{\n let nlabel = model_nlabels[d][index];\n color.push(getNodeColor(nlabel, 2));\n }\n })\n real_color = color.slice(); // original color storage.\n if(selectedNodeIdList.indexOf(index)<0){\n // Unfocused nodes color will be set to \"#ddd\".\n color = [\"#ddd\"];\n highlight = 0;\n }\n \n //if(nweight && NLabelList[0] && nweight[NLabelList[0]]) {\n // node_weight = nweight[NLabelList[0]][index];\n //}\n let radius = 3;\n if(index === select_inspect_node && showSource === true){\n radius = 6;\n }\n let node_object:any = {\n \"id\":index,\n \"group\":label, // dummy\n \"color\":color,\n \"real_color\":real_color,\n \"radius\":radius, // the radius of the node\n \"highlight\":highlight, // whether the node is highlighted.\n \"node_weight\":skew_weight(node_weight)\n } \n if(enablePrevGraphLayout){\n node_object[\"x\"] = prevGraphJson[\"nodes\"][i][\"x\"];\n node_object[\"y\"] = prevGraphJson[\"nodes\"][i][\"y\"];\n }\n //else if(enable_forceDirected === false){\n // node_object[\"x\"] = new_graph_layout[i][0];\n // node_object[\"y\"] = new_graph_layout[i][1];\n //}\n nodes_json.push(node_object);\n }\n\n // Prepare Properties of Links\n let edge_weighted: boolean;\n let current_eweights;\n if(eweightList && eweightList.length!==0) {\n edge_weighted = true;\n let graph_eweight_options = Object.keys(common.eweights);\n if (graph_eweight_options.indexOf(eweightList) > -1) {\n current_eweights = common.eweights[eweightList];\n } else {\n current_eweights = eweight[eweightList];\n }\n } else {\n edge_weighted = false;\n }\n\n for(let i = 0; i=0){\n if(selectedNodeIdList.indexOf(target_list[i])>=0){\n link_color = \"#bbb\";\n }\n }\n // Store the possible color. \n if(links_color_json.indexOf(link_color)>=0){\n \n }else{\n links_color_json.push(link_color);\n }\n \n links_json.push({\n \"source\": source_list[i],\n \"target\": target_list[i],\n \"value\":1,\n \"weight\":skew_weight(edge_weight),\n \"color\":link_color,\n \"real_color\":real_color // For hovered link color.\n })\n }\n\n let graph_json = {\n \"success\":true,\n \"name\":graph_name,\n \"nodes\":nodes_json,\n \"links\":links_json,\n \"links_color\":links_color_json,\n \"nodenum\":node_num,\n \"edgenum\":edge_num,\n \"enable_forceDirected\":enableForceDirected,\n \"colorLegend\":this.getColorLegend(color_mode, common.num_nlabel_types)\n }\n return graph_json;\n }\n\n // Data Preprocessing for edge subgraph\n // graph_object: original graph object.\n // model_nlabels: record mapping from model names to predicted nlabels\n // NLabelList: array of nlabel names, e.g. \"ground_truth\", \"GCN\"\n // select_inspect_node: selected node\n // subg_name: subgraph name\n // subgs: record mapping from subgraph name to subgraph collections\n // enableForceDirected: control whether using force directed layout.\n // showSource: current mode on whether showing only selected node.\n // width / height: the size of graph view.\n public constructEdgeGraphJson(graph_object:any, model_nlabels:any, NLabelList:any, select_inspect_node:number, \n subg_name:string, subgs:any, enableForceDirected:boolean, showSource:boolean, width:number, height:number){\n let NLabelName = NLabelList.join(\"_\");\n let common = graph_object;\n\n // 1. Data package fingerprint. \n let graph_name = common.name+\"_\"+common.bundle_id\n +\"_SUBG_\"+subg_name+\"_SUBGEND_\"\n +\"_NLABEL_\"+NLabelName+\"_NLABELEND_\"\n +\"_NODE_\"+select_inspect_node+\"_NODEEND_\"\n +enableForceDirected+\"_\"+width+\"_\"+height+\"_\";\n let node_num = common.num_nodes;\n let edge_num = common.srcs.length;\n let graph_target = common.nlabels;\n // let graph_layout = common.layout;\n let source_list = common.srcs;\n let target_list = common.dsts;\n // ordered\n let selectedNodeIdList = subgs[subg_name][select_inspect_node].nodes;\n // ordered\n let selectedEdgeIdList = subgs[subg_name][select_inspect_node].eids;\n let nweight = subgs[subg_name][select_inspect_node].nweight;\n let eweight = subgs[subg_name][select_inspect_node].eweight;\n \n // 2. Transform the graph layout.\n // TODO: revisit and see if this is really necessary.\n // let new_graph_layout = [];\n // for(let i = 0; i 0){\n // new_graph_layout = transform_graphlayout(new_graph_layout, width, height);\n // }\n\n // 3. If we have processed the graph layout, then we use previous graph layout.\n let enablePrevGraphLayout = false;\n let prevGraphJson = this.prevGraphJson;\n if(prevGraphJson && prevGraphJson[\"success\"]){\n if(prevGraphJson[\"nodes\"].length === node_num){\n enablePrevGraphLayout = true;\n }\n }\n\n // 4. Derive the info of nodes and links.\n let nodes_json = []; // node info\n let links_json = []; // link info\n let links_color_json = []; // link color info\n\n // Prepare properties of nodes.\n let color_mode: boolean = NLabelList.length !== 0;\n // If ground truth is not selected, then we use dummycolor to fill the area of ground truth.\n let dummycolor = \"#aaa\";\n let init_color:any = [];\n if (!color_mode) {\n init_color = [dummycolor];\n }\n let selectedNodeOrder = 0;\n console.log('select_inspect_node', select_inspect_node);\n console.log('showSource', showSource);\n console.log('selectedNodeIdList', selectedNodeIdList);\n for(let i = 0; i{\n if(d === \"ground_truth\"){\n let nlabel = graph_target[index];\n color.push(getNodeColor(nlabel, 2));\n }else{\n let nlabel = model_nlabels[d][index];\n color.push(getNodeColor(nlabel, 2));\n }\n })\n real_color = color.slice(); // original color storage.\n\n if(selectedNodeIdList[selectedNodeOrder] === i){\n node_weight = nweight[selectedNodeOrder];\n selectedNodeOrder = selectedNodeOrder + 1;\n } else {\n // Unfocused nodes color will be set to \"#ddd\".\n color = [\"#ddd\"];\n highlight = 0;\n }\n\n let radius = 3;\n if(index === select_inspect_node && showSource === true){\n radius = 6;\n }\n let node_object:any = {\n \"id\":index,\n \"group\":label, // dummy\n \"color\":color,\n \"real_color\":real_color,\n \"radius\":radius, // the radius of the node\n \"highlight\":highlight, // whether the node is highlighted.\n \"node_weight\":skew_weight(node_weight)\n }\n if(enablePrevGraphLayout){\n node_object[\"x\"] = prevGraphJson[\"nodes\"][i][\"x\"];\n node_object[\"y\"] = prevGraphJson[\"nodes\"][i][\"y\"];\n }\n //else if(enable_forceDirected === false){\n // node_object[\"x\"] = new_graph_layout[i][0];\n // node_object[\"y\"] = new_graph_layout[i][1];\n // }\n nodes_json.push(node_object);\n }\n\n // Prepare Properties of Links\n let selectedEdgeOrder = 0;\n for(let i = 0; i=0){\n \n }else{\n links_color_json.push(link_color);\n }\n\n links_json.push({\n \"source\": source_list[i],\n \"target\": target_list[i],\n \"value\":1,\n \"weight\":skew_weight(edge_weight),\n \"color\":link_color,\n \"real_color\":real_color // For hovered link color.\n })\n }\n\n let graph_json = {\n \"success\":true,\n \"name\":graph_name,\n \"nodes\":nodes_json,\n \"links\":links_json,\n \"links_color\":links_color_json,\n \"nodenum\":node_num,\n \"edgenum\":edge_num,\n \"enable_forceDirected\":enable_forceDirected,\n \"colorLegend\":this.getColorLegend(color_mode, common.num_nlabel_types)\n }\n return graph_json;\n }\n\n // Enable Force Directed Layout.\n public onEnableForceDirected(checked:boolean){\n console.log(\"Change State,\", checked);\n /*this.setState({\n enableForceDirected: checked\n })*/\n this.props.changeEnableForceDirected(checked);\n }\n\n // Extended Mode Change\n public onExtendedModeChange(e:any){\n this.props.changeExtendedMode(e);\n }\n\n // Construct Extended Selected Node Id List\n public constructExtendedSelectedNodeIdList(selectedNodeIdList:any, NeighborSet:any){\n if(selectedNodeIdList.length === 0){\n return [];\n }else{\n \n let new_selectedNodeIdList = selectedNodeIdList.slice();\n for(let i = 0 ; i=node_num){\n new_node_id = node_num - 1;\n }\n console.log(\"graphview, new_node_id\", new_node_id);\n this.props.changeSelectInspectNode(new_node_id);\n }\n\n // show graph view setting modal.\n public showGraphViewSettingModal(){\n this.props.changeGraphViewSettingsModal_visible(true);\n }\n public render() {\n let {graph_object, model_nlabels, model_eweights, model_nweights, subgs, NLabelList, eweightList, subgList, \n selectedNodeIdList, showSource, select_inspect_node, width, height, extendedMode} = this.props;\n\n let onNodeClick = this.onNodeClick;\n let UpdateCurrentGraphJson = this.UpdateCurrentGraphJson;\n let specificNodeIdList = selectedNodeIdList;\n\n let common = graph_object;\n let graph_in = constructGraphIn(common);\n\n // Construct Neighbor Set\n let NeighborSet = constructNeighborSet(graph_in);\n \n // Define Force Directed Graph Size.\n let ForceDirectedWidth = width - 10;\n let ForceDirectedHeight = height - 50;\n if(showSource){\n if(width < 800 && width > 650){\n ForceDirectedHeight = height - 50 - 23;\n }else if(width <= 650){\n ForceDirectedHeight = height - 50 - 47;\n }\n }else{\n if(width < 650 && width > 550){\n ForceDirectedHeight = height - 50 - 23;\n }else if(width <= 550){\n ForceDirectedHeight = height - 50 - 47;\n }\n }\n\n\n // Preprocess Data.\n let graph_json:any;\n if(extendedMode <= 3) {\n // According to the showSource to determine the displayed node. \n if(showSource){\n specificNodeIdList = [select_inspect_node];\n }\n // Extended Mode Configuration\n if(extendedMode === 2){\n specificNodeIdList = this.constructExtendedSelectedNodeIdList(specificNodeIdList, NeighborSet);\n }else if(extendedMode === 3){\n specificNodeIdList = this.constructExtendedSelectedNodeIdList(specificNodeIdList, NeighborSet);\n specificNodeIdList = this.constructExtendedSelectedNodeIdList(specificNodeIdList, NeighborSet);\n }\n\n graph_json = this.constructNodeGraphJson(graph_object, model_nlabels, model_eweights, model_nweights, \n NLabelList, eweightList, specificNodeIdList, this.props.enableForceDirected, \n select_inspect_node, showSource, ForceDirectedWidth, ForceDirectedHeight);\n } else {\n let subg_name = subgList[extendedMode-4];\n specificNodeIdList = subgs[subg_name][select_inspect_node].nodes;\n\n graph_json = this.constructEdgeGraphJson(graph_object, model_nlabels, NLabelList, select_inspect_node, \n subg_name, subgs, this.props.enableForceDirected, showSource, \n ForceDirectedWidth, ForceDirectedHeight);\n }\n \n // Store NeighborSet.\n graph_json[\"NeighborSet\"] = NeighborSet;\n \n if(graph_json[\"success\"]){\n // Store Graph Json.\n //console.log(\"Store Graph Json.\")\n //this.prevGraphJson = graph_json;\n\n // Get node num.\n let nodenum: number = graph_json[\"nodenum\"];\n\n // Extended Options\n let extendedOptions = [\n [1,\"None\"],\n [2,\"One Hop\"],\n [3,\"Two Hop\"]];\n \n for (var subg_type_id = 0; subg_type_id < subgList.length; subg_type_id++) {\n extendedOptions.push([subg_type_id + 4, subgList[subg_type_id]]);\n }\n\n // Event Handler for Starting or Stoping Layout.\n let stopLayout = () =>{\n this.onEnableForceDirected(false);\n }\n let startLayout = () =>{\n this.onEnableForceDirected(true);\n }\n\n // If showSource is true, then it means that currently the user has selected a node in the graph view.\n\n return ( \n
\n
Graph View\n
\n     \n {/** Input Id */}\n {(showSource)?[Id:,\n {this.onChangeSelectInspectNode(e,nodenum);}} />,\n  ,\n ]:[]}\n {/** Setting Modal */}\n \n     \n {/** Extended Selector */}\n Subgraph: \n \n {extendedOptions.map((d:any)=>(\n \n ))}\n \n {/** Force Directed Layout Enabler */}\n     \n {(this.props.enableForceDirected)?\n :\n }\n {/** Setting Modal Button */}\n     \n \n {/** Node Num Info */}\n     \n #Nodes: {getNodeStatisticStr(specificNodeIdList.length, nodenum)} \n \n
\n
\n {/** Force Directed Graph */}\n
\n \n \n
\n
\n
\n )}else{\n return
\n }\n }\n}\n\n","import GraphView from './GraphView'\nexport default GraphView;\n\n\n","import GraphView from '../components/DataRuns/GraphView/'\nimport { connect } from 'react-redux';\nimport { Dispatch } from 'redux';\n\n//import { decrement, increment } from '../actions';\nimport { StoreState } from '../types';\nimport {changeSpecificNodeIdList, changeSelectInspectNode, changePrevGraphJson, \n changeShowSource, changeExtendedMode, changeGraphViewSettingsModal_visible, changeEnableForceDirected} from '../actions';\n\n// 将 reducer 中的状态插入到组件的 props 中\nconst mapStateToProps = (state: StoreState) => ({\n selectedNodeIdList : state.selectedNodeIdList,\n selectedMessagePassingNodeIdList: state.selectedMessagePassingNodeIdList,\n showSource: state.showSource,\n select_inspect_node: state.select_inspect_node,\n extendedMode : state.extendedMode,\n GraphViewSettingsModal_visible: state.GraphViewSettingsModal_visible,\n enableForceDirected : state.enableForceDirected\n})\n\n// 将 对应action 插入到组件的 props 中\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n changeSpecificNodeIdList: (specificNodeIdList:any) => dispatch(changeSpecificNodeIdList(specificNodeIdList)),\n changeSelectInspectNode : (select_inspect_node:number) => dispatch(changeSelectInspectNode(select_inspect_node)),\n changePrevGraphJson: (prevGraphJson:any) => dispatch(changePrevGraphJson(prevGraphJson)),\n changeShowSource: (showSource:boolean) => dispatch(changeShowSource(showSource)),\n changeExtendedMode: (extendedMode:any) => dispatch(changeExtendedMode(extendedMode)),\n changeGraphViewSettingsModal_visible: (visible:boolean) => dispatch(changeGraphViewSettingsModal_visible(visible)),\n changeEnableForceDirected: (enableForceDirected: boolean) => dispatch(changeEnableForceDirected(enableForceDirected))\n})\n\n// 使用 connect 高阶组件对 Counter 进行包裹\nexport default connect(mapStateToProps, mapDispatchToProps)(GraphView);\n\n\n\n","import axios from 'axios';\n\n// If enable, then it will load static data. Otherwise, it will load from remote backend.\n// Currently, it does not support remote backend mode. \nconst ENABLE_STATIC_JSON = false;\n// Remote Backend.\nconst URL = process.env.NODE_ENV === 'development'\n ? 'http://localhost:7777'\n : window.location.origin;\nconst axiosInstance1 = axios.create({\n baseURL: `${URL}/api/`,\n // timeout: 1000,\n headers: {\n 'Access-Control-Allow-Origin': '*'\n }\n});\n\n// Load Static Data.\nconst URL2 = window.location.origin;\nconst axiosInstance2 = axios.create({\n baseURL: `${URL2}/data/`,\n // timeout: 1000,\n headers: {\n 'Access-Control-Allow-Origin': '*'\n }\n});\n\nlet axiosInstance = (ENABLE_STATIC_JSON)?axiosInstance2:axiosInstance1;\n\n// Read graph dataset metainfo.\nexport async function getDatasetList(): Promise {\n let url = `/graphs`;\n if(ENABLE_STATIC_JSON){\n url = '/datasetlist.json'\n }\n //const params = { classifier_start, classifier_end };\n const res = await axiosInstance.get(url);\n if (res.status === 200) {\n return res.data;\n }\n throw res;\n}\n\n// Read model metainfo.\nexport async function getModelList(dataset_id:number): Promise {\n let url = '/models'\n let res;\n if(ENABLE_STATIC_JSON){\n url = '/cache_modellist_'+dataset_id+'.json'\n res = await axiosInstance.get(url);\n }else{\n let params = { dataset_id };\n res = await axiosInstance.get(url, {params});\n }\n \n if (res.status === 200) {\n return res.data;\n }\n throw res;\n}\n\n// Read subgraph metainfo.\nexport async function getSubgraphList(dataset_id:number): Promise {\n let url = '/subgraphs'\n let res;\n if(ENABLE_STATIC_JSON){\n url = '/cache_subgraphlist_'+dataset_id+'.json';\n res = await axiosInstance.get(url);\n }else{\n let params = { dataset_id };\n res = await axiosInstance.get(url, {params});\n }\n if (res.status === 200) {\n return res.data;\n }\n throw res;\n}\n\n// Read graph data.\nexport async function getGraphInfo(dataset_id:number): Promise {\n let url = '/graphinfo';\n let res;\n if(ENABLE_STATIC_JSON){\n url = '/cache_graph_'+dataset_id+\".json\";\n res = await axiosInstance.get(url);\n }else{\n let params = { dataset_id };\n res = await axiosInstance.get(url, {params});\n }\n if (res.status === 200) {\n return res.data;\n }\n throw res;\n}\n\n// Read model data.\nexport async function getModelInfo(dataset_id:number, model_id:number): Promise {\n let url = '/modelinfo';\n let res;\n if(ENABLE_STATIC_JSON){\n url = '/cache_graph_'+dataset_id+\"_model_\"+model_id+\".json\";\n res = await axiosInstance.get(url);\n }else{\n let params = { dataset_id, model_id };\n res = await axiosInstance.get(url, {params});\n }\n if (res.status === 200) {\n return res.data;\n }\n throw res;\n}\n\n// Read subgraph data.\nexport async function getSubgraphInfo(dataset_id:number, subgraph_id:number): Promise {\n let url = '/subgraphinfo';\n let res;\n if(ENABLE_STATIC_JSON){\n url = 'cache_graph_'+dataset_id+\"_subgraph_\"+subgraph_id+\".json\";\n res = await axiosInstance.get(url);\n }else{\n let params = { dataset_id, subgraph_id };\n res = await axiosInstance.get(url, {params});\n }\n if (res.status === 200) {\n return res.data;\n }\n throw res;\n}\n","import * as React from 'react';\nimport { Select, Row } from 'antd';\nimport { getDatasetList } from '../../../service/dataService';\nconst Option = Select.Option;\n\nexport interface DataSelectorProps {\n dataset_id : number | null, // dataset id\n datasetList: any, // dataset list\n changeDataset: any, // change dataset\n clearIdInfo: any, // clear id info\n initDatasetList: any // initialize dataset list\n}\n\nexport interface DataSelectorState {\n}\n\nexport default class DataSelector extends React.Component {\n constructor(props: DataSelectorProps) {\n super(props);\n this.onDatasetSelectorChange = this.onDatasetSelectorChange.bind(this);\n this.state = {\n };\n }\n // Initialize Dataset List.\n componentDidMount(){\n this.initDatasetList();\n }\n public async initDatasetList(){\n const datasetList_package = await getDatasetList();\n if(datasetList_package[\"success\"] === true){\n this.props.initDatasetList(datasetList_package[\"datasets\"]);\n }\n \n }\n // Handling the event of changing data selector. \n public onDatasetSelectorChange(value: number) {\n this.props.changeDataset(value);\n this.props.clearIdInfo();\n }\n public render() { \n let disabledDatasetSelector = this.props.datasetList.length <= 0;\n return (\n \n Graph: \n \n {this.props.datasetList.map((d:any)=>(\n \n ))}\n \n \n \n )\n \n }\n}","import DataSelector from '../components/DataRuns/ControlPanel/DataSelector';\nimport { connect } from 'react-redux';\nimport { Dispatch } from 'redux';\n\nimport {changeDataset,initDatasetList, clearIdInfo} from '../actions';\nimport { StoreState } from '../types';\n\n\n// 将 reducer 中的状态插入到组件的 props 中\nconst mapStateToProps = (state: StoreState) => ({\n dataset_id: state.dataset_id,\n datasetList: state.datasetList\n})\n\n// 将 对应action 插入到组件的 props 中\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n changeDataset: (dataset_id:number | null) => dispatch(changeDataset(dataset_id)),\n clearIdInfo: () => dispatch(clearIdInfo()),\n initDatasetList : (datasetList: any) => dispatch(initDatasetList(datasetList))\n})\n\n// 使用 connect 高阶组件对 Counter 进行包裹\nexport default connect(mapStateToProps, mapDispatchToProps)(DataSelector);\n","import * as React from 'react';\nimport { Select, Row } from 'antd';\nconst Option = Select.Option;\n\nexport interface IProps {\n NLabelOptions: any[], // nlabel options\n NLabelList : any, // selected nlabel options\n changeNLabel: any // change nlabel\n}\n\nexport interface IState {}\n\nexport default class NLabelSelector extends React.Component {\n constructor(props: IProps) {\n super(props);\n this.onNLabelSelectorChange = this.onNLabelSelectorChange.bind(this);\n this.state = {};\n }\n public onNLabelSelectorChange(value: any[]) {\n this.props.changeNLabel(value);\n }\n public render() {\n let {NLabelOptions} = this.props;\n let disabledNLabelSelector = NLabelOptions.length <= 0;\n let nlabel_options_indexed = [];\n for(let i = 0; i< NLabelOptions.length; i++){\n let nlabel_object:any = {\n \"name\": NLabelOptions[i],\n \"id\": i\n }\n nlabel_options_indexed.push(nlabel_object);\n }\n return (\n \n NLabel: \n \n {nlabel_options_indexed.map((d:any)=>(\n \n ))}\n \n \n )\n }\n}\n","import NLabelSelector from '../components/DataRuns/ControlPanel/NLabelSelector';\nimport { connect } from 'react-redux';\nimport { Dispatch } from 'redux';\n\nimport {changeNLabel} from '../actions';\nimport { StoreState } from '../types';\n\n\n// 将 reducer 中的状态插入到组件的 props 中\nconst mapStateToProps = (state: StoreState) => ({\n NLabelOptions : state.NLabelOptions,\n NLabelList : state.NLabelList,\n})\n\n// 将 对应action 插入到组件的 props 中\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n changeNLabel: (NLabelList: any | null) => dispatch(changeNLabel(NLabelList)),\n})\n\n// 使用 connect 高阶组件对 Counter 进行包裹\nexport default connect(mapStateToProps, mapDispatchToProps)(NLabelSelector);","import * as React from 'react';\nimport { Select, Row } from 'antd';\nconst Option = Select.Option;\n\nexport interface IProps {\n EWeightOptions: any[], // eweight options\n eweightList: any, // selected eweight options\n changeEWeight: any, // change eweight\n}\n\nexport interface IState {}\n\nexport default class EWeightSelector extends React.Component {\n constructor(props: IProps) {\n super(props);\n this.onEWeightSelectorChange = this.onEWeightSelectorChange.bind(this);\n this.state = {\n };\n }\n \n public onEWeightSelectorChange(value: any[]) {\n this.props.changeEWeight(value);\n }\n public render() { \n let {EWeightOptions} = this.props;\n let disabledEWeightSelector = EWeightOptions.length <= 0\n let eweight_options_indexed = [];\n for(let i = 0; i\n EWeight: \n \n {eweight_options_indexed.map((d:any)=>(\n \n ))}\n \n \n \n )\n \n }\n}","import EWeightSelector from '../components/DataRuns/ControlPanel/EWeightSelector';\nimport { connect } from 'react-redux';\nimport { Dispatch } from 'redux';\n\nimport {changeEWeight} from '../actions';\nimport { StoreState } from '../types';\n\n\n// 将 reducer 中的状态插入到组件的 props 中\nconst mapStateToProps = (state: StoreState) => ({\n EWeightOptions : state.EWeightOptions,\n eweightList: state.eweightList\n})\n\n// 将 对应action 插入到组件的 props 中\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n changeEWeight: (eweightList: any | null) => dispatch(changeEWeight(eweightList)),\n})\n\n// 使用 connect 高阶组件对 Counter 进行包裹\nexport default connect(mapStateToProps, mapDispatchToProps)(EWeightSelector);\n","import './index.css';\nimport ControlPanel from './ControlPanel';\nexport default ControlPanel;","import * as React from 'react';\nimport {Row} from 'antd';\nimport DataSelectorContainer from '../../../container/DataSelectorContainer';\nimport NLabelSelectorContainer from '../../../container/NLabelSelectorContainer';\nimport EWeightSelectorContainer from '../../../container/EWeightSelectorContainer';\nexport interface ControlPanelProps {\n dataset_id: number | null,\n}\n\nexport interface ControlPanelState {}\n\nexport default class ControlPanel extends React.Component {\n constructor(props: ControlPanelProps) {\n super(props);\n this.state = {};\n }\n public render() {\n return (\n
\n
Control Panel
\n
\n \n \n \n \n \n \n \n \n \n
\n
\n \n );\n }\n}\n","import ControlPanel from '../components/DataRuns/ControlPanel'\nimport { connect } from 'react-redux';\nimport { Dispatch } from 'redux';\n\n//import { decrement, increment } from '../actions';\nimport { StoreState } from '../types';\n\n\n// 将 reducer 中的状态插入到组件的 props 中\nconst mapStateToProps = (state: StoreState) => ({\n dataset_id : state.dataset_id\n})\n\n// 将 对应action 插入到组件的 props 中\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n})\n\n// 使用 connect 高阶组件对 Counter 进行包裹\nexport default connect(mapStateToProps, mapDispatchToProps)(ControlPanel);\n\n\n\n","import DataRuns from './DataRuns'\nexport default DataRuns;\n\n\n","\nimport './DataRuns.css'\nimport * as React from \"react\";\nimport GraphViewContainer from '../../container/GraphViewContainer';\nimport ControlPanelContainer from '../../container/ControlPanelContainer';\nimport { getGraphInfo, getModelList, getModelInfo, getSubgraphList, getSubgraphInfo } from '../../service/dataService';\nimport GridLayout from \"react-grid-layout\";\n\n\nexport interface IProps {\n dataset_id : number | null,\n contentWidth:number,\n contentHeight:number,\n NLabelList : any,\n eweightList: any,\n changeEnableForceDirected : any,\n changeNLabelOptions: any,\n changeEWeightOptions: any,\n changeNLabel: any,\n changeEWeight: any,\n changeShowSource: any,\n}\nexport interface IState {\n graph_object : any,\n model_list : any,\n model_nlabels : any,\n model_eweights: any,\n model_nweights: any,\n subg_list : any,\n subgs : any,\n layout_config: any,\n screenWidth: number,\n screenHeight: number\n}\n\nexport default class DataRuns extends React.Component{\n public GraphViewRef:any;\n public ControlPanelRef: any;\n constructor(props:IProps) {\n super(props);\n this.onResizeStop = this.onResizeStop.bind(this);\n this.getLayoutConfigWithName = this.getLayoutConfigWithName.bind(this);\n this.getCurrentLayoutConfig = this.getCurrentLayoutConfig.bind(this);\n this.GraphViewRef = React.createRef();\n this.ControlPanelRef = React.createRef();\n let m_to_eweights: Record> = {};\n this.state = {\n graph_object:{\n model : -1,\n graph : -1, \n },\n model_list: null,\n model_nlabels: null,\n model_eweights: m_to_eweights,\n model_nweights: null,\n subg_list: [],\n subgs: null,\n layout_config: null,\n screenWidth : 0,\n screenHeight: 0\n }\n // show_mode_specification\n // 1 -> graph_input\n // 2 -> graph_target\n // 3 -> graph_output\n // 4 -> Explain_mode\n // Explained_node, default for 0.\n\n //this.resize.bind(this);\n // Flow:\n // 1. Constructor\n // 2. componentWillMount()\n // 3. render()\n // 4. componentDidMount()\n // If props update:\n // 4.1 componentWillReceiveProps(nextProps : IProps), then goto 5.\n // If States update\n // 5. shouldComponentUpdate() if return false, then no rerendering.\n // 6. if True, then componentWillUpdate\n // 7. render()\n // 8. componentDidUpdate\n // If Unmount, then componentWillUnmount()\n }\n\n\n // When the view is mounted, it will be executed.\n componentDidMount(){\n //window.addEventListener('resize', this.onResize)\n this.setState({\n layout_config: this.getWholeLayoutConfig(),\n screenHeight: window.innerHeight,\n screenWidth: window.innerWidth\n })\n }\n // Get graph data. \n public async getGraphBundledData(dataset_id:number){\n let data = await getGraphInfo(dataset_id);\n let m_to_eweights: Record> = {};\n if(data[\"success\"] === true){\n data[\"graph_obj\"][\"bundle_id\"] = dataset_id;\n for (var head in data[\"graph_obj\"][\"eweights\"]) {\n let mname = \"Graph/\".concat(head);\n m_to_eweights[mname] = data[\"graph_obj\"][\"eweights\"][head]\n }\n data[\"graph_obj\"][\"eweights\"] = m_to_eweights\n this.setState({\n graph_object: data[\"graph_obj\"]\n })\n this.props.changeEnableForceDirected(true);\n this.props.changeNLabelOptions([]);\n this.props.changeNLabelOptions([]);\n this.props.changeNLabel([]);\n this.props.changeEWeight([]);\n this.props.changeShowSource(false);\n }\n }\n // Get associated model list and model data.\n public async getModelData(dataset_id:number){\n let mlist = await getModelList(dataset_id);\n if(mlist[\"success\"] === true){\n let m_to_nlabels: Record> = {};\n let m_to_eweights: Record> = {};\n // let m_to_nweights: Record> = {};\n for (var model_info of mlist[\"models\"]) {\n let mdata = await getModelInfo(dataset_id, model_info[\"id\"]);\n m_to_nlabels[mdata[\"model_obj\"][\"name\"]] = mdata[\"model_obj\"][\"nlabels\"];\n // m_to_eweights[mdata[\"model_obj\"][\"name\"]] = mdata[\"model_obj\"][\"eweight\"];\n // m_to_nweights[mdata[\"model_obj\"][\"name\"]] = mdata[\"model_obj\"][\"nweight\"];\n for (var head in mdata[\"model_obj\"][\"eweights\"]) {\n let mname = mdata[\"model_obj\"][\"name\"].concat(\"/\");\n m_to_eweights[mname.concat(head)]= mdata[\"model_obj\"][\"eweights\"][head];\n }\n }\n this.setState({\n model_list: mlist[\"models\"],\n model_nlabels: m_to_nlabels,\n model_eweights: m_to_eweights, // TODO\n // model_nweights: m_to_nweights// TODO\n })\n }\n }\n // Get associated subgraph list and subgraph data.\n public async getSubgraphData(dataset_id:number){\n let slist = await getSubgraphList(dataset_id);\n if(slist[\"success\"] === true){\n // Name to subgraphs\n let n_to_subgs: Record = {};\n for (var subg_info of slist[\"subgraphs\"]) {\n let sdata = await getSubgraphInfo(dataset_id, subg_info[\"id\"]);\n n_to_subgs[sdata[\"name\"]] = sdata[\"node_subgraphs\"];\n }\n this.setState({\n subg_list: slist[\"subgraphs\"].map((d:any)=>(d[\"name\"])),\n subgs: n_to_subgs\n })\n }\n }\n // Get width and height from view name. \n public getLayoutConfigWithName(name:string){\n let width = 0;\n let height = 0;\n if(name === \"GraphView\"){\n if(this.GraphViewRef){\n width = this.GraphViewRef.current.offsetWidth;\n height = this.GraphViewRef.current.offsetHeight;\n }\n }else if(name === \"ControlPanel\"){\n if(this.ControlPanelRef){\n width = this.ControlPanelRef.current.offsetWidth;\n height = this.ControlPanelRef.current.offsetHeight;\n }\n }\n\n return {\n \"width\":width,\n \"height\":height\n }\n }\n // Get the whole layout config. \n public getWholeLayoutConfig(){\n let viewName = [\"GraphView\", \"ControlPanel\"]; \n let layout_config:any = {};\n viewName.forEach((d:any)=>{\n layout_config[d] = this.getLayoutConfigWithName(d);\n })\n return layout_config;\n }\n\n // Get layout config from view name. \n public getCurrentLayoutConfig(name:string){\n let layout_config = this.state.layout_config;\n if(layout_config){\n if(layout_config[name]){\n return layout_config[name];\n }else{\n return null;\n }\n }else{\n return null;\n }\n }\n\n // Handling the changing of states or props.\n componentDidUpdate(prevProps:IProps, prevState:IState) {\n //console.log('Component did update!')\n // If the dataset_id has been changed. \n if(prevProps.dataset_id !== this.props.dataset_id){\n // If the id is valid.\n if( this.props.dataset_id && this.props.dataset_id>=0){\n // Get the graph data. \n this.getGraphBundledData(this.props.dataset_id);\n // Get the model data associated with the graph.\n this.getModelData(this.props.dataset_id);\n // Get the subgraph data associated with the graph.\n this.getSubgraphData(this.props.dataset_id);\n }else{\n // Set to a dummy case.\n this.setState({\n graph_object:{\n model : -1,\n graph : -1, \n }\n })\n }\n }\n\n // If the window is resized, update the layout config. \n if(prevProps.contentHeight!==this.props.contentHeight\n || prevProps.contentWidth !== this.props.contentWidth){\n this.setState({\n layout_config: this.getWholeLayoutConfig()\n })\n } \n }\n\n // RESERVED: handling the layout change.\n public onLayoutChange(layout:any){}\n // For react-grid-layout, when the resizing is fixed, the layout configuration should be updated.\n public onResizeStop(layout:any){\n console.log(\"onResizeStop\", layout);\n console.log(\"Layout\", this.getWholeLayoutConfig());\n this.setState({\n layout_config : this.getWholeLayoutConfig()\n })\n //var width = document.getElementById('a').offsetWidth;\n }\n public render() {\n // Rendering.\n let {graph_object, model_nlabels, model_eweights} = this.state;\n let dataset_id = -1;\n if(graph_object.bundle_id){\n dataset_id = graph_object.bundle_id; \n let nlabel_options: any[] = [];\n console.log('graph_object', graph_object);\n if (graph_object.nlabels.length !== 0) {\n nlabel_options.push(\"ground_truth\");\n }\n if (model_nlabels !== null) {\n nlabel_options = nlabel_options.concat(Object.keys(model_nlabels));\n }\n this.props.changeNLabelOptions(nlabel_options);\n\n let eweight_options: any[] = [];\n eweight_options = Object.keys(graph_object.eweights);\n if (model_eweights !== null) {\n eweight_options = eweight_options.concat(Object.keys(model_eweights));\n }\n this.props.changeEWeightOptions(eweight_options);\n }\n\n // Generate Graph View.\n let generateGraphView = (graph_object: any, model_nlabels: any, model_eweights: any, model_nweights: any, \n subgs: any, NLabelList: any, eweightList: any, subgList: any, width:number, height:number) => {\n return \n }\n // Generate Control Panel\n let generateControlPanel = () => {\n return \n }\n \n // layout is an array of objects, see the demo for more complete usage\n let enableStatic = true; // If enabled static, the layout cannot be manually configured.\n let max_row_num = Math.floor(this.props.contentHeight / 40); // Maximum rows in the screen.\n // small width, height: 1707 724\n // big width, height: 2560 1175\n let ControlPanelH = max_row_num;\n let GraphViewPanelH = max_row_num;\n \n let layout = [\n {i: 'b', x: 5, y: 0, w: 19, h: GraphViewPanelH, static:enableStatic}, // Graph View\n {i: 'd', x: 0, y: 0, w: 5, h: ControlPanelH, static:enableStatic} // Control Panel\n ];\n \n\n // Generate Whole Layout.\n let generateWholeView = () =>{\n let screenwidth = window.innerWidth;\n //let screenheight = window.innerHeight;\n\n \n return
\n
\n {(dataset_id>=0 && this.getCurrentLayoutConfig(\"GraphView\"))?generateGraphView(graph_object, \n this.state.model_nlabels, this.state.model_eweights, this.state.model_nweights, this.state.subgs, \n this.props.NLabelList, this.props.eweightList, this.state.subg_list,\n this.getCurrentLayoutConfig(\"GraphView\")[\"width\"], \n this.getCurrentLayoutConfig(\"GraphView\")[\"height\"]):
}\n
\n
\n {generateControlPanel()}\n
\n \n \n
\n }\n \n return generateWholeView();\n }\n}\n\n","import DataRuns from '../components/DataRuns'\nimport { connect } from 'react-redux';\nimport { Dispatch } from 'redux';\n\n//import { decrement, increment } from '../actions';\nimport { StoreState } from '../types';\nimport {changeEnableForceDirected, changeEWeightOptions, changeNLabelOptions, changeNLabel, changeEWeight, changeShowSource} from '../actions';\n\n// 将 reducer 中的状态插入到组件的 props 中\nconst mapStateToProps = (state: StoreState) => ({\n dataset_id : state.dataset_id,\n NLabelList : state.NLabelList,\n eweightList: state.eweightList\n})\n\n// 将 对应action 插入到组件的 props 中\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n changeEnableForceDirected: (enableForceDirected: boolean) => dispatch(changeEnableForceDirected(enableForceDirected)),\n changeNLabelOptions: (NLabelOptions: any) => dispatch(changeNLabelOptions(NLabelOptions)),\n changeEWeightOptions: (EWeightOptions: any) => dispatch(changeEWeightOptions(EWeightOptions)),\n changeNLabel: (NLabelList: any | null) => dispatch(changeNLabel(NLabelList)),\n changeEWeight: (eweightList: any | null) => dispatch(changeEWeight(eweightList)),\n changeShowSource: (showSource:boolean) => dispatch(changeShowSource(showSource)),\n})\n\n// 使用 connect 高阶组件对 Counter 进行包裹\nexport default connect(mapStateToProps, mapDispatchToProps)(DataRuns);\n","import { Col, Layout, Row } from 'antd';\n\nimport React from 'react';\nimport logo from './logo2.png';\nimport './App.css';\nimport DataRunsContainer from '../container/DataRunsContainer';\n// import DataView from \"./DataView\";\n//import SidePanel from '../components/SidePanel';\nconst { Content, Header } = Layout;\nexport interface IProps{\n\n}\nexport interface IState {\n contentWidth:number,\n contentHeight:number,\n screenWidth:number,\n screenHeight:number\n}\nclass App extends React.Component {\n public ContentRef:any;\n constructor(props:IProps) {\n super(props);\n this.ContentRef = React.createRef();\n this.onResize = this.onResize.bind(this);\n this.state = {\n contentWidth : 0,\n contentHeight: 0,\n screenHeight: 0,\n screenWidth :0\n }\n\n }\n public getLayoutConfig(){\n let contentWidth:number = 0;\n let contentHeight:number = 0;\n if(this.ContentRef){\n contentWidth = this.ContentRef.current.offsetWidth;\n contentHeight = this.ContentRef.current.offsetHeight;\n }\n return {\n contentWidth:contentWidth, \n contentHeight:contentHeight\n }\n }\n public onResize(){\n this.updateLayoutState();\n } \n public updateLayoutState(){\n let contentLayout = this.getLayoutConfig();\n let contentWidth = contentLayout.contentWidth;\n let contentHeight = contentLayout.contentHeight;\n //console.log(\"contentWidth, height\", contentWidth, contentHeight)\n this.setState({\n contentWidth:contentWidth,\n contentHeight:contentHeight,\n screenHeight: window.innerHeight,\n screenWidth: window.innerWidth\n })\n }\n componentDidMount(){\n window.addEventListener('resize', this.onResize)\n this.updateLayoutState();\n }\n componentDidUpdate(prevProps:IProps, prevState:IState) {\n // if(prevState.contentWidth!==this.state.contentWidth || )\n //this.updateLayoutState();\n }\n public render() {\n let {screenWidth, screenHeight, contentWidth, contentHeight} = this.state;\n return (\n \n
\n GNNLens\n \n
\n \n
\n {(contentWidth>0 && contentHeight >0)?:
}\n
\n
\n
\n \n \n );\n }\n}\n\nexport default App;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(\n process.env.PUBLIC_URL,\n window.location.href\n );\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' }\n })\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import { DATASET_ID_CHANGE, INIT_DATASET_LIST, SELECTED_NODE_ID_LIST_CHANGE,\n SHOW_SOURCE_CHANGE,SPECIFIC_NODE_ID_LIST_CHANGE, SELECT_INSPECT_NODE_CHANGE,CLEAR_ID_INFO, PREV_GRAPH_JSON_CHANGE,\n GRAPHVIEWSTATE_CHANGE, GRAPHVIEWSETTINGMODAL_VISIBLE_CHANGE, EXTENDED_MODE_CHANGE, \n NLABEL_CHANGE, EWEIGHT_CHANGE, ENABLE_FORCE_DIRECTED_CHANGE, NLABEL_OPTIONS_CHANGE, EWEIGHT_OPTIONS_CHANGE} from '../constants';\nimport {StoreState} from '../types';\nconst initial_state : StoreState = {\n dataset_id : null,\n refreshnumber: 0,\n showSource: false,\n datasetList: [],\n filters: {},\n selectedNodeIdList: [],\n selectedMessagePassingNodeIdList: [],\n specificNodeIdList: [],\n select_inspect_node : 0,\n prevGraphJson: null,\n extendedMode:1,\n GraphViewSettingsModal_visible:false,\n GraphViewState:{\n DisplayUnfocusedNodes:false,\n DisplayOverview:true\n },\n // model: null,\n NLabelList: [],\n // eweight_id: null,\n eweightList: [],\n enableForceDirected: true,\n NLabelOptions: [],\n EWeightOptions: []\n}\n// 处理并返回 state \nexport default (state = initial_state, action:any): StoreState => {\n \n switch (action.type) {\n case DATASET_ID_CHANGE:\n // Change dataset id\n return {\n ...state,\n dataset_id: action.dataset_id,\n };\n case INIT_DATASET_LIST:\n // init dataset list\n return {\n ...state,\n datasetList: action.datasetList\n };\n case NLABEL_CHANGE:\n // Change NLabelList\n return {\n ...state,\n NLabelList: action.NLabelList\n }\n case EWEIGHT_CHANGE:\n // Change eweightList\n return {\n ...state,\n eweightList: action.eweightList\n } \n case SELECTED_NODE_ID_LIST_CHANGE:\n //console.log(\"selectedNodeIdList Store State Change\",action.selectedNodeIdList);\n return {\n ...state,\n selectedNodeIdList: action.selectedNodeIdList\n }\n case SHOW_SOURCE_CHANGE:\n return {\n ...state,\n showSource: action.showSource\n }\n case SPECIFIC_NODE_ID_LIST_CHANGE:\n //console.log(\"SpecificNodeIdListChange\", action.specificNodeIdList);\n return {\n ...state,\n specificNodeIdList: action.specificNodeIdList\n }\n case SELECT_INSPECT_NODE_CHANGE:\n //console.log(\"Select inspect node change\", action.select_inspect_node);\n return {\n ...state,\n select_inspect_node: action.select_inspect_node\n }\n case CLEAR_ID_INFO:\n return {\n ...state,\n filters: {},\n selectedNodeIdList: [],\n selectedMessagePassingNodeIdList: [],\n specificNodeIdList: [],\n select_inspect_node : 0\n }\n case PREV_GRAPH_JSON_CHANGE:\n return {\n ...state,\n prevGraphJson: action.prevGraphJson\n }\n case GRAPHVIEWSETTINGMODAL_VISIBLE_CHANGE:\n return {\n ...state,\n GraphViewSettingsModal_visible: action.GraphViewSettingsModal_visible\n }\n case GRAPHVIEWSTATE_CHANGE:\n return {\n ...state,\n GraphViewState: action.GraphViewState\n }\n case EXTENDED_MODE_CHANGE:\n return {\n ...state,\n extendedMode: action.extendedMode\n }\n case ENABLE_FORCE_DIRECTED_CHANGE:\n return {\n ...state,\n enableForceDirected: action.enableForceDirected\n }\n case NLABEL_OPTIONS_CHANGE:\n return {\n ...state,\n NLabelOptions: action.NLabelOptions\n }\n case EWEIGHT_OPTIONS_CHANGE:\n return {\n ...state,\n EWeightOptions: action.EWeightOptions\n }\n default:\n return state\n }\n}\n\n\n//import { DECREMENT, INCREMENT } from '../constants';\n\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './components/App';\nimport * as serviceWorker from './serviceWorker';\nimport { Provider } from 'react-redux';\nimport { createStore } from 'redux';\nimport reducer from './reducer'; \nimport \"./react_grid_layout_style.css\"\nimport \"./react_resizable_styles.css\"\n// 1、创建 store\nconst store = createStore(reducer);\n\nReactDOM.render(// 2、然后使用react-redux的Provider将props与容器连通起来\n \n \n \n , document.getElementById('root')\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""} \ No newline at end of file diff --git a/vis_src/src/components/DataRuns/GraphView/GraphView.tsx b/vis_src/src/components/DataRuns/GraphView/GraphView.tsx index c9dc64e..437927d 100644 --- a/vis_src/src/components/DataRuns/GraphView/GraphView.tsx +++ b/vis_src/src/components/DataRuns/GraphView/GraphView.tsx @@ -296,11 +296,13 @@ export default class GraphView extends React.Component{ // width / height: the size of graph view. public constructEdgeGraphJson(graph_object:any, model_nlabels:any, NLabelList:any, select_inspect_node:number, subg_name:string, subgs:any, enableForceDirected:boolean, showSource:boolean, width:number, height:number){ + let NLabelName = NLabelList.join("_"); let common = graph_object; // 1. Data package fingerprint. let graph_name = common.name+"_"+common.bundle_id +"_SUBG_"+subg_name+"_SUBGEND_" + +"_NLABEL_"+NLabelName+"_NLABELEND_" +"_NODE_"+select_inspect_node+"_NODEEND_" +enableForceDirected+"_"+width+"_"+height+"_"; let node_num = common.num_nodes; @@ -351,6 +353,9 @@ export default class GraphView extends React.Component{ init_color = [dummycolor]; } let selectedNodeOrder = 0; + console.log('select_inspect_node', select_inspect_node); + console.log('showSource', showSource); + console.log('selectedNodeIdList', selectedNodeIdList); for(let i = 0; i