admin管理员组文章数量:1287972
I have some cytoscape nodes with
style: cytoscape.stylesheet()
.selector('node')
.css({
'border-color': '#0266C8',
'border-width' : '1px',
'shape': 'data(faveShape)',
'width': '80px',
'font-family' : 'Consolas',
'font-size' : '10px',
'content': 'data(id)',
'text-valign': 'center',
'background-color': 'data(faveColor)',
'color': 'data(textColor)'
})
...
How can I have a content with two or more lines and 2 or more concatenated strings?
...
'content': 'data(id)' + '<br>' + data('name') + '<br>test123',
...
TIA
I have some cytoscape nodes with
style: cytoscape.stylesheet()
.selector('node')
.css({
'border-color': '#0266C8',
'border-width' : '1px',
'shape': 'data(faveShape)',
'width': '80px',
'font-family' : 'Consolas',
'font-size' : '10px',
'content': 'data(id)',
'text-valign': 'center',
'background-color': 'data(faveColor)',
'color': 'data(textColor)'
})
...
How can I have a content with two or more lines and 2 or more concatenated strings?
...
'content': 'data(id)' + '<br>' + data('name') + '<br>test123',
...
TIA
Share Improve this question asked Jul 11, 2014 at 13:40 Magno CMagno C 2,1964 gold badges28 silver badges58 bronze badges1 Answer
Reset to default 10In your stylesheet:
text-wrap: wrap;
label: 'My multiline\nlabel';
See http://js.cytoscape/#style/labels
本文标签: javascriptHow can I set a multiple text lines in CytoscapeJS node contentStack Overflow
版权声明:本文标题:javascript - How can I set a multiple text lines in Cytoscape.JS node content? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741332744a2372858.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论