React-color: Jumpiness in the lower right of Saturation component

Created on 1 Sep 2016  路  4Comments  路  Source: casesandberg/react-color

As you drag around in the Saturation component, there is a loss of precision in the lower right corner and the pointer becomes jumping around. This is a GIF showing this behavior on the project page's Sketch example, but it is true in any color picker where the Saturation component is also used (e.g. Chrome, Photoshop).

sep-01-2016 11-13-59

bug help wanted

Most helpful comment

Ah, good catch! I think that is an error because when I wrote the Saturation component I have the position updating in real time based off the value, instead it should let the client control the position so it will be smooth. I will put this on the TODO list!

All 4 comments

Ah, good catch! I think that is an error because when I wrote the Saturation component I have the position updating in real time based off the value, instead it should let the client control the position so it will be smooth. I will put this on the TODO list!

In my own app I've just implemented it this way - I read the initial value from props but subsequent updates are stored in the component state, which makes it a non-pure component, but I'm not noticing any performance jank and makes the picker position behave much more expected.

馃檶 Can you open up a PR with the changes in here and I can look at them and get them merged in?

This is going to be addressed in the v3 update! Follow along with this issue here: https://github.com/casesandberg/react-color/issues/404

Was this page helpful?
0 / 5 - 0 ratings