bebraw / colorjoe

Scaleable color picker with touch and AMD support (MIT)

Home Page:http://bebraw.github.io/colorjoe/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Orientation of sliders

kvacke opened this issue · comments

Hi,

I wonder if I can get some assistance on changing the orientation on sliders from vertical to horizontal?
I managed to rotate it (ez pz) but I can't figure out how to make it listen to mouse movements along the x-axis... 🤔

Can you set up a standalone example somewhere online (codesandbox or something)?

Note that this library isn't well supported as there are so many more modern alternatives available.

Thanks so much for this fast reply! This package actually fits our needs perfectly in terms of customization, it's just this nagging detail that I can't figure out. I can see if I can figure out an example. Should it be as simple as transform:rotate(90deg)? I looked at one of the examples listed in the readme and don't see it in their css.

I would check https://github.com/bebraw/colorjoe#sites-using-colorjoe for additional examples as I think some of those do what you want.

It sounds like some CSS trick potentially, yeah. Maybe bit of JS.

I ended up deleting 'alpha' from extras and wrote my own slider and used it's value with picker.set(). Thanks anyway! ⭐

Cool. If you want, feel free to send a couple of lines of code on how you did it and I'll add to docs.