Browse Source

BUG:3614 detect defect value and handle change

pull/3670/head
Ryan Wilson 5 years ago
parent
commit
a2b558e7a4
  1. 4
      src/utils/ColorPicker.js

4
src/utils/ColorPicker.js

@ -207,6 +207,7 @@ export default function($, undefined) {
resize = throttle(reflow, 10),
visible = false,
isDragging = false,
isDefault = true,
dragWidth = 0,
dragHeight = 0,
dragHelperHeight = 0,
@ -782,6 +783,7 @@ export default function($, undefined) {
isEmpty = true;
} else {
isEmpty = false;
isDefault = !color; // if no color is available an empty string will be passed. tinycolor will then set it to #000
newColor = tinycolor(color);
newHsv = newColor.toHsv();
@ -956,7 +958,7 @@ export default function($, undefined) {
function updateOriginalInput(fireCallback) {
var color = get(),
displayColor = '',
hasChanged = !tinycolor.equals(color, colorOnShow);
hasChanged = isDefault ? true : !tinycolor.equals(color, colorOnShow);
if (color) {
displayColor = color.toString(currentPreferredFormat);

Loading…
Cancel
Save