mirror of
https://github.com/PitPik/tinyColorPicker
synced 2025-08-13 04:02:44 -06:00
empty value support
This commit is contained in:
parent
bf464a2919
commit
9f11548aa2
@ -198,7 +198,8 @@
|
|||||||
s = colors.hsv.s * _$xy_slider._width,
|
s = colors.hsv.s * _$xy_slider._width,
|
||||||
v = (1 - colors.hsv.v) * _$xy_slider._height,
|
v = (1 - colors.hsv.v) * _$xy_slider._height,
|
||||||
a = alpha * _$alpha._width,
|
a = alpha * _$alpha._width,
|
||||||
translate3d = _GPU ? 'translate3d' : '';
|
translate3d = _GPU ? 'translate3d' : '',
|
||||||
|
hasNoValue = _$trigger.val() === '' && typeof toggled === 'boolean';
|
||||||
|
|
||||||
_$xy_slider._css = {
|
_$xy_slider._css = {
|
||||||
backgroundColor: 'rgb(' +
|
backgroundColor: 'rgb(' +
|
||||||
@ -221,10 +222,11 @@
|
|||||||
borderColor : alphaContrast + ' transparent'
|
borderColor : alphaContrast + ' transparent'
|
||||||
};
|
};
|
||||||
_$trigger._css = {
|
_$trigger._css = {
|
||||||
backgroundColor : text,
|
backgroundColor : hasNoValue ? '' : text,
|
||||||
color: colors.rgbaMixBGMixCustom.luminance > 0.22 ? dark : light
|
color: hasNoValue ? '' :
|
||||||
|
colors.rgbaMixBGMixCustom.luminance > 0.22 ? dark : light
|
||||||
};
|
};
|
||||||
_$trigger.text = _$trigger.val() !== text ? text : '';
|
_$trigger.text = hasNoValue ? '' : _$trigger.val() !== text ? text : '';
|
||||||
|
|
||||||
toggled !== undefined ? render(toggled) : _animate(render);
|
toggled !== undefined ? render(toggled) : _animate(render);
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
2
jqColorPicker.min.js
vendored
2
jqColorPicker.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user