Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handleBlockChange({ hex, $event }) {
if (isValidHex(hex)) {
// this.hex = hex;
this.handleChange(
{
hex,
source: 'hex',
},
$event,
);
}
}
}
handleBlockChange({ hex, $event }) {
if (isValidHex(hex)) {
// this.hex = hex;
this.handleChange(
{
hex,
source: 'hex',
},
$event,
);
}
}
}
handleBlockChange({ hex, $event }) {
if (isValidHex(hex)) {
// this.hex = hex;
this.handleChange({ hex, source: 'hex' }, $event);
}
}
handleChange({ data, $event }) {
if (data.hex) {
if (isValidHex(data.hex)) {
this.onChange.emit({
data: {
hex: data.hex,
source: 'hex',
},
$event,
});
}
} else if (data.r || data.g || data.b) {
this.onChange.emit({
data: {
r: data.r || this.rgb.r,
g: data.g || this.rgb.g,
b: data.b || this.rgb.b,
source: 'rgb',
},
handleChange({ data, $event }) {
if (data.hex) {
if (isValidHex(data.hex)) {
this.onChange.emit({
data: {
hex: data.hex,
source: 'hex',
},
$event,
});
}
} else if (data.r || data.g || data.b) {
this.onChange.emit({
data: {
r: data.r || this.rgb.r,
g: data.g || this.rgb.g,
b: data.b || this.rgb.b,
source: 'rgb',
},
handleChange({ data, $event }) {
if (data.hex) {
if (isValidHex(data.hex)) {
this.onChange.emit({
data: {
hex: data.hex,
source: 'hex',
},
$event,
});
}
} else {
this.onChange.emit({
data: {
r: data.r || this.rgb.r,
g: data.g || this.rgb.g,
b: data.b || this.rgb.b,
source: 'rgb',
},
handleChange($event: Event) {
const data = calculateAlphaChange($event, this, this.container.nativeElement);
if (data) {
this.onChange.emit({ data, $event });
}
}
}
handleChange($event: Event) {
const data = calculateHueChange($event, this, this.container.nativeElement);
if (data) {
this.onChange.emit({data, $event});
}
}
}
handleChange($event: Event) {
$event.preventDefault();
const data = calculateSaturationChange($event, this, this.container.nativeElement);
this.onChange.emit({ data, $event });
}
}
handleBlockChange({ hex, $event }) {
if (isValidHex(hex)) {
this.handleChange({ hex, source: 'hex' }, $event);
}
}
handleValueChange({ data, $event }) {