在 Cytoscape 选择器样式中使用代数运算 Sheet

Use Algrebraic Operation in Cytoscape Selector Style Sheet

我想使用代数运算,以便在 Cytoscape 风格中更加灵活 sheet。我的第一次试用是

    {
        selector: 'node',
        style: {
            'content': 'data(d0)',
            'width': 'data(d1)*10 -5', /*Here*/
            'height': 'data(d1)/10 +5' /*Here*/
        }
    },

然而,结果是无效的。有人可以帮忙吗?

我建议为此功能使用函数:

{
    selector: 'node',
    style: {
        'content': 'data(d0)',
        'width': function (node) {
            return (node.data().di * 10) - 5;
        },
        'height': function (node) {
            return (node.data().di / 10) + 5;
        }
    }
}