buberdds / angular-bootstrap-colorpicker

Native AngularJS colorpicker directive. No dependency on jQuery or jQuery plugin is required.
MIT License
419 stars 226 forks source link

Resizing Widget #39

Closed NickPadilla closed 8 years ago

NickPadilla commented 10 years ago

Hello,

This is more of a question, or real issues with your module. In fact it has worked really nicely. However, I will be using this mainly - for now anyway - on mobile platforms. So far it has worked really well but it is small and so difficult to really control it well. I was wondering if there was a way to make the whole thing larger. I think that would solve the problem with mobile platforms. Please let me know if you have any guidance or thoughts.

Thanks for a cool project! Nick

clouddueling commented 10 years ago

Have you tried modifying the css just to make things bigger and probably percentage based? I haven't tried that yet personally but that would be the first thing I'd try. (currently going through this process for another of our modules for ipads)

NickPadilla commented 10 years ago

hey @clouddueling! Thanks for the response! I'll see what i can do here.. I did a quick attempt at this but found that the images used repeat themselves when the box grows bigger than its size. I'll need to get into the css more to figure out how to fix that, I am not a css guru unfortunately.

buberdds commented 10 years ago

Hi there,

the css part is quite easy, color calculations might be tricky. I'll try to figure it out today!

buberdds commented 10 years ago

You can find an example here (branch: resize), https://github.com/buberdds/angular-bootstrap-colorpicker/compare/resize?expand=1 I hope it will be sufficient for you.

On the other hand we can add another attribute to the directive and make the size fully customizable.

<input colorpicker colorpicker-size="200" />

What are you thinking about this @NickPadilla @clouddueling ?

NickPadilla commented 10 years ago

Thanks @buberdds! This looks great! I do think that allowing a customizable size makes sense. It does work well as is for the android 4.1.2 platform.

There are a few changes that would be helpful for mobile platforms. I'd like to get to this as soon as I am able - since right now I just needed a colorpicker that worked well. Ideas for the mobile platforms:

support drag operations on color hue slider.
provide a handle next to hue slider to make manipulation easier with finger. support drag operation on the saturation box.

I'll add a new ticket for this and fork this project, hopefully I can get to this next week sometime.

mattnish commented 10 years ago

Hell yah thanks @buberdds this is just what I was looking for.

nebulaszlonemethi commented 9 years ago

+1 for having size to be configurable (without burning in a final size into the code)

omidahourai commented 9 years ago

bump / +1 for sizing configuration as attribute

jbonigomes commented 9 years ago

+1 (config attribute)

jbonigomes commented 9 years ago

Is this option going to be added soon? Reason for my question is that I don't want to modify the core library, I am using it via Bower and have to deliver my project(using it) quite soon.

valuka commented 8 years ago

+1 Would love this feature in config, without needing to modify core lib.

buberdds commented 8 years ago

example colorpicker-size="200"

works only with px and it's affecting saturation panel only