Browse Source

empty value support

pull/25/head
peterd 7 years ago
parent
commit
9f11548aa2
  1. 10
      jqColorPicker.js
  2. 2
      jqColorPicker.js.map
  3. 2
      jqColorPicker.min.js

10
jqColorPicker.js

@ -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);
}

2
jqColorPicker.js.map
File diff suppressed because it is too large
View File

2
jqColorPicker.min.js
File diff suppressed because it is too large
View File

Loading…
Cancel
Save