【问题标题】:Cannot change color of UML state in jointjs无法在jointjs中更改UML状态的颜色
【发布时间】:2017-03-10 05:21:25
【问题描述】:

我是jointjs的新手,我正在尝试使用以下命令更改UML状态图的颜色:

graph.getElements()[4].attributes.attrs[".uml-state-body"]["fill"] = "#ff0000";

但它并没有改变状态的颜色。

【问题讨论】:

    标签: javascript html css jointjs


    【解决方案1】:

    改用 API 方法:

    graph.getElements()[4].attr('.uml-state-body/fill', '#ff0000')

    http://resources.jointjs.com/docs/jointjs/v1.0/joint.html#dia.Element.prototype.attr

    【讨论】:

    • 谢谢它的工作...你能支持我的问题吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-02-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多