文本宽度截断细胞景观
Text width cut off cytoscape
我在 cytoscape 中的节点下方遇到文本截断问题。
我玩过 css 但文本仍然被截断。
export const styles = [
{
selector: 'node',
style: {
label: 'data(label)',
width: 'mapData(weight, 40, 80, 20, 60)',
height: 'mapData(weight, 40, 80, 20, 60)',
content: 'data(name)',
'background-color': 'data(colorCode)',
color: '#262626',
'font-size': 15
}
},
{
selector: ':selected',
style: {
'border-width': 1,
'border-color': 'black',
'font-size': 17
}
},
{
selector: '.bottom-center',
style: {
'text-valign': 'bottom',
'text-halign': 'center'
}
}
示例:
文本 “12 - 测试用户表现良好” 位于节点下方,但像这样被截断:“- 测试用户表现良好” =22=]
我的错,不得不在样式中使用 'wrap' 作为文本,它完成了工作
我在 cytoscape 中的节点下方遇到文本截断问题。
我玩过 css 但文本仍然被截断。
export const styles = [
{
selector: 'node',
style: {
label: 'data(label)',
width: 'mapData(weight, 40, 80, 20, 60)',
height: 'mapData(weight, 40, 80, 20, 60)',
content: 'data(name)',
'background-color': 'data(colorCode)',
color: '#262626',
'font-size': 15
}
},
{
selector: ':selected',
style: {
'border-width': 1,
'border-color': 'black',
'font-size': 17
}
},
{
selector: '.bottom-center',
style: {
'text-valign': 'bottom',
'text-halign': 'center'
}
}
示例:
文本 “12 - 测试用户表现良好” 位于节点下方,但像这样被截断:“- 测试用户表现良好” =22=]
我的错,不得不在样式中使用 'wrap' 作为文本,它完成了工作