Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
laomaolaile opened this issue Nov 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@laomaolaile
Copy link

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

其他需要补充的

万分感谢

@laomaolaile laomaolaile added the bug Something isn't working label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant