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

Introducing "rangeSelectorColor" option #957

Open
haschu opened this issue Apr 11, 2019 · 0 comments
Open

Introducing "rangeSelectorColor" option #957

haschu opened this issue Apr 11, 2019 · 0 comments

Comments

@haschu
Copy link

haschu commented Apr 11, 2019

With the rangeSelectorAlpha-option, we can define the transparency level of the range-selector, but there is no way to set the actual color.

It would be nice to have a rangeSelectorColor-option as an alternative where one can set the whole color-(RGBA)-string.

Currently we have the following implementation:

ctx.fillStyle = 'rgba(240, 240, 240, ' + this.getOption_('rangeSelectorAlpha').toString() + ')';

I would suggest something like:

var fillStyle = this.getOption_('rangeSelectorColor').toString();

// If not defined, stick with the old way to be backwards compatible
if (!fillStyle) {
  fillStyle = 'rgba(240, 240, 240, ' + this.getOption_('rangeSelectorAlpha').toString() + ')';
}

ctx.fillStyle = fillStyle;

I could come up with a pull request, if you guys are okay with that solution :-)

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

No branches or pull requests

1 participant