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

火狐浏览器,graph插入自定义node,自定义node中的内容显示空白 #4532

Closed
563450620 opened this issue Dec 18, 2024 · 4 comments

Comments

@563450620
Copy link

问题描述

image 上述是firefox中的内容 下面是正常的,在chrome浏览器中 image

重现链接

公司内部环境,暂无链接

重现步骤

react渲染

register({
  shape: 'custom-portal-react-node',
  component: CardList as any,
});

const reactCustomNode = {
  shape: 'custom-portal-react-node',
  x: -100,
  y: -300,
};
useEffect(() => {
    if (graph) {
      setGraphNodeId(graph.addNode(reactCustomNode).id);
      setIsInit(false);
    }
  }, [graph]);

  const { run: getOkrList } = useDebounceFn(() => {
    if (props.queryForm.erp) {
      ObjectiveApi.getOkrList({ ...props.queryForm, statusList: props.queryForm.status === ObjectiveStatus.All ? [ObjectiveStatus.InProgress, ObjectiveStatus.Archived] : [props.queryForm.status] })
        .then((groupList) => {
          setIsEmpty(groupList.map(item => item.goalList).reduce((prev, item) => prev.concat(item), []).length === 0);
        });
    }
  }, { wait: 100 });
  useEffect(() => {
    if (graph) {
      graph.centerContent();
      graph.removeNode(graphNodeId);
      if (!isInit) {
        setGraphNodeId(graph.addNode(reactCustomNode).id);
      }
    }
    getOkrList();
  }, [props.queryForm]);

预期行为

期望得到火狐浏览器的解决方案,跪求速解

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox ...]
  • X6 版本: [2.11.1 ...]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@x6-bot
Copy link
Contributor

x6-bot bot commented Dec 18, 2024

👋 @563450620

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.

@563450620
Copy link
Author

火狐浏览器中 缩放浏览器页面ctrl+ + 或ctrl + - 就能得到有内容的自定义节点

@563450620
Copy link
Author

火狐浏览器中 缩放浏览器页面ctrl+ + 或ctrl + - 就能得到有内容的自定义节点

但是初始化时 就不显示

@563450620
Copy link
Author

火狐浏览器 需要设置node的width和height

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant