简体   繁体   English

jsbin上的cytoscape.js乔木布局

[英]cytoscape.js arbor layout on jsbin

I am trying to do a lightweight "lab" using cytoscape.js on JSBin, and am only having problems with the arbor layout. 我正在尝试在JSBin上使用cytoscape.js做一个轻量级的“实验室”,并且仅在乔木布局上遇到问题。 I have been pounding on my nonworking example , and after dropping in a script that works on a server and then fails, I'm thinking I've run into a different twist on the classic 'arbor not working' problem. 我一直在研究我的非工作示例 ,并在可以在服务器上运行的脚本中删除然后失败之后,我认为我在经典的“乔木不工作”问题上遇到了不同的转折。

I know the answer to that question is to use the cytoscape.js version of arbor.js. 我知道该问题的答案是使用borscape.js的cytoscape.js版本。 But, what is described in the admonition , doesn't work on JSBin. 但是, 警告中描述的内容不适用于JSBin。 So, my question is how to get to this version of the script without having the option of loading the script from the site, and in a way that JS novices might be able to replicate. 因此,我的问题是,如何在不选择从站点加载脚本的情况下获取此版本的脚本,以及使JS新手能够复制的方式。

Specifically, I can use the script tag 具体来说,我可以使用脚本标签

<script src="http://cytoscape.github.io/cytoscape.js/api/cytoscape.js-latest/cytoscape.min.js"></script> 

in my html and get other layouts, but is there a comparable resource for the cytoscape.js version of arbor.js ? 在我的HTML中并获得其他布局,但是cytoscape.js版本的arbor.js是否具有可比的资源?

After pounding a little harder, I confirmed that my hanging JSBin is due to something missing in the orginal arbor.js; 经过一番努力之后,我确认我挂起的JSBin是由于原始的arbor.js中缺少了一些东西。 and it seems the answer to my question is that there can't be such a thing because of technicalities with web workers -- arbor.js has to be local. 我的问题的答案似乎是,由于网络工作者的技术问题,不可能有这样的事情-arbor.js必须是本地的。

You could try http://cytoscape.github.io/cytoscape.js/api/cytoscape.js-latest/arbor.js 您可以尝试http://cytoscape.github.io/cytoscape.js/api/cytoscape.js-latest/arbor.js

But there's no guarantee that or similar URLs might change or disappear in future. 但是,不能保证将来类似的URL可能会更改或消失。 They're used for the docs and (I think) some examples, but they certainly should not be used in production environments. 它们用于文档和一些示例(我认为),但是它们肯定不应该在生产环境中使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM