mxgraph-删除节点CSS样式使用JavaScript
我想从MXGraph单元格中删除CSS样式。 我添加了这样的风格:
let style = node.style;
style = mxUtils.setStyle(style, 'strokeColor', color);
self.graph.model.setStyle(node, style);
I want to remove a CSS style from a mxgraph cell.
I have added the style like this:
let style = node.style;
style = mxUtils.setStyle(style, 'strokeColor', color);
self.graph.model.setStyle(node, style);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将样式设置为
null
或undefined
。mxutils.setStyle
功能函数从样式字符串中删除样式:You could set the style to
null
orundefined
. ThemxUtils.setStyle
function takes care of removing the style from the style string: