cytoscape

Increase width of selected edges only (cytoscape.js)

 ̄綄美尐妖づ 提交于 2019-12-07 19:44:13
问题 How can I predefine when I select a few nodes that are connected or simply edges, to make the width of the selected edges be bigger, without affecting the rest of edges of the entire network or the node's width? I predefined this when the nodes or edges are selected: $('#cy').cytoscape({ style: cytoscape.stylesheet() .selector(':selected') .css({ 'background-color': 'black', 'line-color': 'red', 'target-arrow-color': 'black', 'source-arrow-color': 'black', 'opacity': 1 })... but there is no

A hidden Cytoscape graph cannot be displayed later

你离开我真会死。 提交于 2019-12-06 11:04:26
问题 I have 2 Bootstrap columns (each width is 6 out of 12), the one on the left has some buttons, the one on the right contains a Cytoscape graph initialized with 5 nodes. Initially, when the page loading finished, the Cytoscape graph is set to be hidden. $('.cyto_div').hide(); My intention is that when the "Show" button is clicked, the Cytoscape graph should appear. $('.cyto_div').show(); However, only the panel covering the Cytoscape graph appears, the graph itself doesn't appear. When I resize

cytoscape save graph as image by button

回眸只為那壹抹淺笑 提交于 2019-12-06 05:21:05
问题 I saw in the cytoscape.js tutorial that there are ways to represent the graph as image (png, jpg), but there is a way to represent it as regular graph, and if the user would want he can save it as image by click on button or similar option? Didn't find simple way for that. I am using python flask as my server side and cytoscape js for the graphes. 回答1: You don't need server side code to save files from the browser anymore. You can save files using the saveAs() API in JS. Here's a polyfill:

cytoscape.js disable grab&moving nodes

断了今生、忘了曾经 提交于 2019-12-05 18:55:43
I'm having trouble building a graph network with cytoscapeJS. I can add nodes and handle them which is quite easy, but I'm not able to configure cytospace to disable Dragging/Moving nodes. I have found a JSbin from somebody where you can try: http://jsbin.com/vasenatimu/2/edit?html,js,output Have a look at http://js.cytoscape.org under 'Initialisation options', I tried all the options, but they dont solve my problem (I set nearly all options to false and I can still grab and select nodes). Can you help me with this? initOptions.autoungrabify: true or cy.nodes().ungrabify() You can also disable

vue cytoscape

落爺英雄遲暮 提交于 2019-12-05 15:19:38
1.先上效果图 拓扑图.gif 2.首先附上一些参考链接: https://github.com/cytoscape/cytoscape.js demo &&api : http://js.cytoscape.org/#demos 其他参考: https://blog.csdn.net/min_mo/article/details/84026197 在你的项目里面下载以下相关包 npm install --save cytoscape cytoscape-dagre dagre 会有以下包被下载下来: image.png 4.新建一个cytoscape.vue组件,代码如下: <template> <div id="box"> <h1>cytoscape-dagre demo</h1> <div id="cy"></div> </div> </template> <script> import cytoscape from 'cytoscape' import cydagre from 'cytoscape-dagre' import dagre from 'dagre' cydagre(cytoscape, dagre) export default { name: 'cytoscape', components: { }, data () { return { } },

A hidden Cytoscape graph cannot be displayed later

故事扮演 提交于 2019-12-04 17:28:04
I have 2 Bootstrap columns (each width is 6 out of 12), the one on the left has some buttons, the one on the right contains a Cytoscape graph initialized with 5 nodes. Initially, when the page loading finished, the Cytoscape graph is set to be hidden. $('.cyto_div').hide(); My intention is that when the "Show" button is clicked, the Cytoscape graph should appear. $('.cyto_div').show(); However, only the panel covering the Cytoscape graph appears, the graph itself doesn't appear. When I resize the browser, then the Cytograph with 5 nodes appear. I suspect somewthing to do with cy.resize(), but

cytoscape save graph as image by button

半腔热情 提交于 2019-12-04 09:29:58
I saw in the cytoscape.js tutorial that there are ways to represent the graph as image (png, jpg), but there is a way to represent it as regular graph, and if the user would want he can save it as image by click on button or similar option? Didn't find simple way for that. I am using python flask as my server side and cytoscape js for the graphes. maxkfranz You don't need server side code to save files from the browser anymore. You can save files using the saveAs() API in JS. Here's a polyfill: https://github.com/eligrey/FileSaver.js/ If you want the graph data, it would just be var jsonBlob =

Styling edges in Cytoscape.js for a Family Tree

匿名 (未验证) 提交于 2019-12-03 10:24:21
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a Family Tree application that uses Django and I am trying to use http://js.cytoscape.org for the UI. I would like to style edges between romantic partners like this: http://www.eprintablecalendars.com/images/arts-and-crafts/family-tree.jpg which is what you commonly see (the square-U). I am completely new to Cytoscape.js, and haven't been able to find any answers in the docs or other threads. 回答1: What you're describing is not edges but hyperedges . A hyperedge has multiple sources and/or targets. You can simulate hyperedge with

How to lock the position of a cytoscape.js node within its parent node

匿名 (未验证) 提交于 2019-12-03 10:24:21
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to lock the position of a node relative to its parent compound node, such that if I grab and drag the parent node, the child node moves with it, but the child is not individually grabbable. If I set the child to be ungrabbable and/or locked, then it doesn't move with its parent, but if I don't, it can be individually dragged, which I don't want. Can this be done? Failing that, is there a way to programmatically grab/ungrab a node so that I can listen for a grab event and then grab the parent instead/as well? 回答1: Compound grabbing

Add an edge label with Cytoscape.js

匿名 (未验证) 提交于 2019-12-03 01:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How can I add a label on an edge using Cytoscape.js? 回答1: Map the label style property to a data field: e.g. in the stylesheet on init ... { selector: 'edge', style: { 'label': 'data(label)' // maps to data.label } } ... http://cytoscape.github.com/cytoscape.js/#style/properties Older versions use content: in place of label: . Newer versions of 2.x allow label and also content for backwards compatibility. 文章来源: Add an edge label with Cytoscape.js