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

SimpleColorChooser width is not properly calculated. #22

Open
maciej-arkit opened this issue Jun 22, 2014 · 1 comment
Open

SimpleColorChooser width is not properly calculated. #22

maciej-arkit opened this issue Jun 22, 2014 · 1 comment
Assignees

Comments

@maciej-arkit
Copy link

Looks like width of SimpleColorChooser is calculated not properly.
It doesn't take into an account border width.
Code should add border.width*2.
Please also notice that 'border' option is not supported. I've created separate issue for this.

// Figure out the cell dimensions options.totalWidth = options.columns \* (options.cellWidth + (2 \* options.cellMargin)); // Figure out the cell dimensions options.totalWidth = options.columns \* (options.cellWidth + (2 \* options.cellMargin)) + border.width*2;

This problem shows up when bootstrap css is used.
Attached screen shot.

2014-06-22 17_00_12-color picker

@mcdemarco
Copy link

I finally figured out this problem while I was in there fixing something else: the expected box model is content-box. If you're using border-box, you can pass in content-box in the chooserCSS:

chooserCSS: { 'box-sizing': 'content-box' }

or add it to the plugin yourself in the options.chooserCSS = $.extend() block (as I did in my fork).

@recurser recurser self-assigned this Aug 6, 2017
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

3 participants