添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
强健的回锅肉  ·  Css for input ...·  5 天前    · 
骑白马的羽毛球  ·  Angular Grid: ...·  5 天前    · 
性感的橙子  ·  遠東百貨·  1 周前    · 
温柔的沙滩裤  ·  objc-runtime-new.h·  3 月前    · 
不爱学习的甘蔗  ·  MySQL :: MySQL 8.4 ...·  4 月前    · 
仗义的登山鞋  ·  .one() : ...·  5 月前    · 
我在桌面 Cytoscape 应用程序中有一个可视化的网络),网络数据导出为.cyjs文件(尽管有后缀,但它是一个 JSON 文件),样式数据(这些数据的格式)同样导出为.json文件。我可以将 theoe 数据加载到在本地网络服务器中运行的 Cytoscape.js —— 手动将样式数据添加到 HTML 文件中。但是,我无法弄清楚如何直接从style.json文件中加载这些样式数据。更新: 感谢@jaromanda-x 和@maxkfranz 在下面非常友好地提供的解决方案,我已经发布了一个答案(如下),在我的同伴研究博客文章Cytoscape.js 样式:外部 JSON 数据文件中有更详细的描述。样式文件[ {  "format_version" : "1.0",  "generated_by" : "cytoscape-3.7.1",  "target_cytoscapejs_version" : "~2.1",  "title" : "victoria_0",  "style" : [ {    "selector" : "node",    "css" : {      "text-valign" : "center",      "text-halign" : "center",      "font-family" : "SansSerif.plain",      "font-weight" : "normal",      "background-color" : "rgb(204,255,255)",      "border-width" : 1.5,      "height" : 35.0,      "width" : 75.0,      "border-opacity" : 1.0,      "color" : "rgb(0,0,0)",      "border-color" : "rgb(0,153,255)",      "text-opacity" : 1.0,      "background-opacity" : 1.0,      "font-size" : 12,      "shape" : "ellipse",      "content" : "data(src_node)"    }  }, {    "selector" : "node:selected",    "css" : {      "background-color" : "rgb(255,255,0)"    }  }, {    "selector" : "edge",    "css" : {      "color" : "rgb(0,0,0)",      "source-arrow-shape" : "none",      "font-family" : "Dialog.plain",      "font-weight" : "normal",      "target-arrow-color" : "rgb(0,0,0)",      "width" : 2.0,      "source-arrow-color" : "rgb(0,0,0)",      "line-color" : "rgb(132,132,132)",      "opacity" : 1.0,      "line-style" : "solid",      "font-size" : 12,      "text-opacity" : 1.0,      "target-arrow-shape" : "triangle",      "content" : "data(pathway)"    }  }, {    "selector" : "edge[pathway = 1]",    "css" : {      "color" : "rgb(204,0,0)"    }  }, {    "selector" : "edge[pathway = 2]",    "css" : {      "color" : "rgb(51,102,0)"    }  }, {    "selector" : "edge:selected",    "css" : {      "line-color" : "rgb(255,0,0)"    }  } ]} ]
查看完整描述