mirror of
https://github.com/PitPik/tinyColorPicker
synced 2025-08-12 11:42:45 -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,
|
||||
v = (1 - colors.hsv.v) * _$xy_slider._height,
|
||||
a = alpha * _$alpha._width,
|
||||
translate3d = _GPU ? 'translate3d' : '';
|
||||
translate3d = _GPU ? 'translate3d' : '',
|
||||
hasNoValue = _$trigger.val() === '' && typeof toggled === 'boolean';
|
||||
|
||||
_$xy_slider._css = {
|
||||
backgroundColor: 'rgb(' +
|
||||
@ -221,10 +222,11 @@
|
||||
borderColor : alphaContrast + ' transparent'
|
||||
};
|
||||
_$trigger._css = {
|
||||
backgroundColor : text,
|
||||
color: colors.rgbaMixBGMixCustom.luminance > 0.22 ? dark : light
|
||||
backgroundColor : hasNoValue ? '' : text,
|
||||
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);
|
||||
}
|
||||
|
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