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

[v1.34.6]复制并粘贴自定义节点 报错 Cannot read property 'foContent' of undefined #3927

Closed
steamfeifei opened this issue Sep 22, 2023 · 3 comments

Comments

@steamfeifei
Copy link

Describe the bug

在复制并粘贴自定义节点的时候,报错foContent ,无法完成征程复制。经过Debug发现,是下面这段代码执行时报的错误:

this.graph.bindKey("ctrl+v", () => {
        console.log('开始粘贴。。。')
        if (!this.graph.isClipboardEmpty()) {
          const cells = this.graph.paste({ offset: 32, useLocalStorage:true, });  // 这行代码报错
          cells.forEach(cell => {
            console.log("copy cell:", cell);
            cell.setData({ id: "" });
            cell.setData({ name: "" });
            cell.setData({ content: "" });
          });
          this.graph.cleanSelection();
          this.graph.select(cells);
        }
        return false;
      });

Your Example Website or App

follow below

Steps to Reproduce the Bug or Issue

在issue中发现,在2.0版本中是解决了这个问题,解决方式如下:
image

Expected behavior

none

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 1.34.6]

Additional context

No response

@x6-bot
Copy link
Contributor

x6-bot bot commented Sep 22, 2023

👋 @steamfeifei

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@steamfeifei steamfeifei changed the title 报错foContent [v1.34.6]复制并真铁自定义节点 报错 Cannot read property 'foContent' of undefined Sep 22, 2023
@steamfeifei steamfeifei changed the title [v1.34.6]复制并真铁自定义节点 报错 Cannot read property 'foContent' of undefined [v1.34.6]复制并粘贴自定义节点 报错 Cannot read property 'foContent' of undefined Sep 22, 2023
@NewByVector
Copy link
Contributor

升级到 1.35.0。

@x6-bot
Copy link
Contributor

x6-bot bot commented Sep 25, 2024

This thread has been automatically locked because it has not had recent activity.

Please open a new issue for related bugs and link to relevant comments in this thread.

@x6-bot x6-bot bot locked as resolved and limited conversation to collaborators Sep 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants