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

add range select by 'ctrl' key. #139

Merged
merged 4 commits into from
May 9, 2020

Conversation

eroamane
Copy link
Contributor

@eroamane eroamane commented May 6, 2020

添加范围选择功能。
可以通过按下Ctrl键选择2个任务之间的全部任务。

添加范围选择功能。
按下Ctrl键时,可以选择 2个任务 之间的任务。
@binux
Copy link
Owner

binux commented May 6, 2020

这个一般不是shift选择两个之间的吗?

@eroamane
Copy link
Contributor Author

eroamane commented May 6, 2020

if (!e.ctrlKey) 改成 if (!e.shiftKey) 即可
或增加shift键 if (!e.ctrlKey || !e.shiftKey)。
问题是,Shift键在浏览器里是选择文本的。改成Ctrl键是为了避免冲突。

@binux
Copy link
Owner

binux commented May 8, 2020

给 .select-box 加一个 user-select: none 的 CSS style 就好了嘛。
我觉得 shift 更自然一点。

@binux binux merged commit 04e6c8f into binux:master May 9, 2020
@eroamane eroamane deleted the master-org-range-select branch May 10, 2020 13:38
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

Successfully merging this pull request may close these issues.

2 participants