Skip to content
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

inherit parent div size, dynamic update of subtext & barcolor without redraw #42

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

markterrill
Copy link

Hi,

There is a bit of a suggested update.
Parent div size: I needed for the knob to be drawn according to CSS size, not the hardcoded size due to the wide range of mobile devices. It's so much easier to detect breakpoints via CSS media and sizing a parent div than detecting every known device and inputing a hard size to ng-knob.
Subtext & barcolor: I've done a tweak to parse whats changed in dynamic options so that elements could be directly updated rather than a complete redraw, this logic could be extended if folk had other attributes they cared about.

Cheers, thanks for an awesome project!

…f subtext and barcolor without a complete redraw
@markterrill
Copy link
Author

Interestingly, i just noticed this takes the approach that some people were talking about in #3

It doesn't provide responsive response to window resize, though the logic is there, easily could be copied into the dynamic options and trigger dynamic options on window resize

@markterrill
Copy link
Author

I have to say. I added onto the list of demo's in the index html, which brought it to 'knobCtrl13' and its Friday 13th here. Also this is pull #42, my favourite number ;)

@hcabnehca
Copy link

Hi I'd really be interested in this improvement. Who do I need to bribe for a merge? ;)

@markterrill
Copy link
Author

Do it yourself if no one answers

@markterrill
Copy link
Author

Or simply clone mine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants