-
Notifications
You must be signed in to change notification settings - Fork 423
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
feat: Auto scroll the viewport when dragging to make selection #656
Conversation
27b0bf7
to
dc8ce3d
Compare
dc8ce3d
to
219b57f
Compare
that's is a quite interesting idea, we can probably make the same change to the SlickRowMoveManager plugin and maybe others |
if Then the property/function could be |
fe4e541
to
b9e9ce8
Compare
@ghiscoding @6pac I update the code and add also apply the change to please check the example again (The test is passed in my PC...let me investigate it tomorrow (china standard time) 😭) |
1b9ab57
to
2f6b1e0
Compare
2f6b1e0
to
be68fd3
Compare
be68fd3
to
4abcadd
Compare
After some investigate, I realized that I should use refer: https://docs.cypress.io/guides/core-concepts/retry-ability#Only-the-last-command-is-retried |
4505847
to
b680bdb
Compare
@aasdkl are you done with the changes? It looks good to me. Out of topic, do you think you could implement the same behavior for |
@ghiscoding Yes it is done.
Sure, I can do it until I have time. |
That would be really great, great contribution. @6pac |
@ghiscoding FYI, #114 can be closed. |
- implements latest SlickGrid [PR #656](6pac/SlickGrid#656) to auto-scroll when making cell or row selection
(Related: #114)
This PR allow auto scroll when dragging to make selection using
cellrangeselector
.Here is the example page
The scrolling speed is based on:
Math.max(MIN, MAX - DelayPerPx * cursorPx)
I'm not sure that setting the option ON by default is appropriate or not.
Also, a cypress test is provided. But I'm afraid that these case may failed in some time because they have compared the dragging time interval:
should MIN interval take effect when auto scroll: 30ms -> 90ms
30ms
.90ms
(3 times of the default).should MAX interval take effect when auto scroll: 600ms -> 200ms
600ms
.200ms
(1/3 of the default).should Delay per Px take effect when auto scroll: 5ms/px -> 50ms/px'
5ms/px
.50ms/px
(10 times of the default).Math.max(30, 600 - 50 * 17) = 30ms
), and the used time should be more than 10 times faster than default.