-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Added touchmove support to slider component #5856
Conversation
d251613
to
e9953c1
Compare
@keul this looks good! Re: 1.x - we'd really rather keep our efforts focused on v2 except for security fixes. Is there something specific preventing you from updating to v2? The one thing we should add is a test. Perhaps we could copy or extend this test: plotly.js/test/jasmine/tests/sliders_test.js Lines 470 to 508 in e27ca3c
Note we have plotly.js/test/jasmine/tests/draw_newshape_test.js Lines 11 to 38 in e27ca3c
|
Nothing but not knowing the compatibility with server side modules. My use of plotly.js depends on the plotly Python module, so I try to keep the same version distributed with the lib itself. I'll take a look adding tests (not sure I'll be able to solve this before summer vacation). Thanks for references! |
Thanks for the PR. Please create
|
@@ -9,6 +9,10 @@ module.exports = function(type, x, y, opts) { | |||
target: el, | |||
clientX: x, | |||
clientY: y, | |||
screenX: x, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was forced to complete the signature of the event or simulating the touch event on the slider will generate a very strange behavior (slider was always moved on the start position).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need to add these? It looks the test passes without it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@archmoj not on my machine (MacOS). Just tested again removing these lines and I have the failure i fixed adding this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for testing.
LGTM 🏅
Over to @alexcjohnson
@alexcjohnson I added the test. But now there's another test that is failing: 5fe96ec#diff-09276d81835ab1fc83e8eb085e4faae2de13348f4be40367cb03276a3f651cbfR549 Seems like |
What happens if you add it to the end? |
@archmoj still fails |
The test passes on my machine. |
@archmoj really sorry for the noise… It works now 🙇 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it. 💃
We will wait for @nicolaskruchten before merging. |
See #5855
Note: the pull request is for the master branch, but I'm wondering if another one can be accepted for the old 1.x branch