Skip to content

调用node.setPortMarkup之后该如何更新视图? #4944

@cosine7

Description

@cosine7

功能描述

需求是在节点已经渲染之后,让用户手动选择连接桩的样式(方的还是圆的还是图片),node.setPortMarkup() 之后视图没有更新,但如果对每个port单独 node.setPortProp(id, 'markup', { ... }) 没有问题,但是这样相同的markup就设置了很多份。

另外,圆形port的x, y是圆心的位置,rect或者image的x y是左上角的位置,切换port markup之后需要手动调整一下port的位置,有没有什么方便的办法来完成?

期望解决方案

希望 node.setPortMarkup() 之后视图会自动更新

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting for maintainerTriage or intervention needed from a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions