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

Color not automatically selected when using RGBA #177

Closed
chopfitzroy opened this issue Mar 11, 2019 · 5 comments
Closed

Color not automatically selected when using RGBA #177

chopfitzroy opened this issue Mar 11, 2019 · 5 comments

Comments

@chopfitzroy
Copy link

chopfitzroy commented Mar 11, 2019

Colors like so:

data() {
    return {
        colors: {
            rgba: {
                r: 255,
                g: 0,
                b: 0,
                a: 1,
            }
        }
    };
},

Input like so:

<chrome-picker :value="colors" @input="updateColor" :disableFields="true"/>

Everything renders fine and the input event works etc... the only issue is the picker circle/slider have not adjusted to represent the initial colors value, however when I use a Hex string (i.e #F00) this does happen.

UPDATE

It actually only seems to not be working when I try to update this.colors like so:

const colors = node.fill.match(/\d+/g); // Standard rgba string

this.colors = {
    rgba: {
        r: +colors[0],
        g: +colors[1],
        b: +colors[2],
        a: +colors[3]
    }
};

I take it this is not reactive intentionally...?

Cheers.

@egeersoz
Copy link

I am also wondering about this.

@terrymun
Copy link

I think that is due to VueJS limitations in detecting mutations in nested object properties.

@Vercoutere
Copy link

I think that is due to VueJS limitations in detecting mutations in nested object properties.

Works perfectly fine with hsl values though...

@linx4200
Copy link
Collaborator

linx4200 commented Mar 5, 2020

Hi guys. After I checked, confirm that this is a long-standing bug. Will fix it in these two days.

@linx4200
Copy link
Collaborator

linx4200 commented Mar 5, 2020

fixed version v2.7.1

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

5 participants