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

如果要显示tooltip,最好的办法是什么呢? #79

Closed
Yeung2017 opened this issue Oct 11, 2018 · 6 comments
Closed

如果要显示tooltip,最好的办法是什么呢? #79

Yeung2017 opened this issue Oct 11, 2018 · 6 comments

Comments

@Yeung2017
Copy link

需求描述

鼠标移入Item时,显示该Item的详细信息,移出则隐藏详细信息.

遇到的问题

1.没有内置Tooltip组件
2.想使用自定义交互进行处理,又遇到了 #78 的问题
所以就暂时卡住了

@gaoli
Copy link
Collaborator

gaoli commented Oct 11, 2018

以下是我项目中的实现方案,供你参考:

  1. 使用 onNodeMouseEnteronNodeMouseLeave 监听鼠标移入移出 Node
  2. 使用 getDomPoint 方法获取结点对应 DOM 坐标
  3. 绘制相应浮动,如果项目基于 antd 的话可以直接使用 Popover

@Yeung2017
Copy link
Author

@gaoli
谢谢提示

@nsuedu
Copy link

nsuedu commented Nov 14, 2018

请教下 getDomPoint 方法的graph对象是从 ggEditor里面的 哪里获取呢?
还有是通过ggEditor的什么属性绘制浮动呢, 还是使用原生canvas绘制? @gaoli @Yeung2017 @

@limingzhe
Copy link

@nsuedu 有同样的问题,请问你是怎么解决了呢

@JoMartinezZhu
Copy link

以下是我项目中的实现方案,供你参考:

  1. 使用 onNodeMouseEnteronNodeMouseLeave 监听鼠标移入移出 Node
  2. 使用 getDomPoint 方法获取结点对应 DOM 坐标
  3. 绘制相应浮动,如果项目基于 antd 的话可以直接使用 Popover

怎么去绘制浮动???

@anjamirth
Copy link

@eevin, @JoMartinezZhu @nsuedu @limingzhe

The following is the implementation scheme in my project for your reference:

  1. Use onNodeMouseEnterand onNodeMouseLeavemonitor the mouse moved out of the Node
  2. Use the getDomPoint method to get the DOM coordinates of the node
  3. Draw the corresponding float, if the project is based on antd, you can use Popover directly

How to draw the floats or Popover. I am also using antd pro-blocks. I am new to this.
Were you able to solve this? Can you pls guide me.

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

6 participants