Skip to content

[Bug]: 连线之后,pen无法移动&属性栏如何能实现响应刷新 #263

Description

@laomaolaile

Code Sanbox异常重现

No response

bug描述

大佬您好,在使用过程中遇到了几个问题,能否请大佬帮忙解决一下

问题一:连线之后,pen无法移动了

我用connectLine给两个Pen连线之后,发现pen无法移动了,请问是哪里使用错误了么?还是应该有别的方法需要调用一下?

let line = meta2d.connectLine(penB, penA);

image

问题二:属性栏如何能实现响应刷新

如下图,我想要实点击按钮2,然后丰2的上面同步添加一组1的内容。添加了之后,属性页并没有立马刷新,有没有好的解决办法。

const groupname = {
            title: "group name " + x,
            ntype: "groupname",
            multiShow: true,
            type: "input",
            prop: "groupname" + x,
            event: "change",
        };

        // 获取当前活动对象的配置
        const config = activePen.target.config;

        // 查找 "intf" 类别
        const intfCategory = config.find(category => category?.ntype === "mintf");

        if (intfCategory) {
            if (intfCategory.children && Array.isArray(intfCategory.children)) {
                for (let i = 0; i < intfCategory.children.length; i++) {
                    if (intfCategory.children[i].prop === control.prop) {
                        intfCategory.children.splice(i, 0, groupname );
                        break; 
                    }
                }
            }
        }

image

期待效果

连线之后,pen可以正常移动,属性栏能响应刷新

发生频率

每次

核心库版本

No response

浏览器版本

No response

其他需要补充的

万分感谢

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions