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

能根据鼠标移动的位置获取当前处于哪个时间吗 #74

Open
HZC961850 opened this issue Aug 20, 2021 · 3 comments
Open

能根据鼠标移动的位置获取当前处于哪个时间吗 #74

HZC961850 opened this issue Aug 20, 2021 · 3 comments

Comments

@HZC961850
Copy link

现在需求是想做到鼠标移动到甘特图上,就可以显示当前对应竖直下的时间,我看没有根据位置来算时间的方法额。

@w1301625107
Copy link
Owner

我后续看一下怎么加上去比较合理

@HZC961850
Copy link
Author

我后续看一下怎么加上去比较合理

大佬,我这边看了代码,看到getPositonOffset,是指根据给定字符串形式的时间生成相对时间轴起点的的偏移值。但是现在的需求是想根据时间轴起点的的偏移值来获取时间,相当于反过来了。这个大佬有没有思路提供下,我先去研究研究。

@w1301625107
Copy link
Owner

( 偏移值 / scale )+起始时间 = 你点击位置的时间

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

2 participants