我是关于联合的新手,我尝试使用以下命令更改UML状态图的颜色:
graph.getElements()[4].attributes.attrs[".uml-state-body"]["fill"] = "#ff0000";
但它并没有改变国家的颜色。
答案 0 :(得分:0)
改为使用API方法:
graph.getElements()[4] .attr(' .uml-state-body / fill','#ff0000')
http://resources.jointjs.com/docs/jointjs/v1.0/joint.html#dia.Element.prototype.attr