|
@ -1112,6 +1112,10 @@ function getPickerRGB(picker) { |
|
|
return $(picker).wheelColorPicker("getValue", "css"); |
|
|
return $(picker).wheelColorPicker("getValue", "css"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function setPickerRGB(picker, color) { |
|
|
|
|
|
$(picker).wheelColorPicker("setValue", value, true); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// TODO: use pct values instead of doing conversion?
|
|
|
// TODO: use pct values instead of doing conversion?
|
|
|
function getPickerHSV(picker) { |
|
|
function getPickerHSV(picker) { |
|
|
var color = $(picker).wheelColorPicker("getColor"); |
|
|
var color = $(picker).wheelColorPicker("getColor"); |
|
@ -1130,7 +1134,11 @@ function setPickerHSV(picker, value) { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function initColor(rgb) { |
|
|
|
|
|
|
|
|
function initColor(cfg) { |
|
|
|
|
|
var rgb = false; |
|
|
|
|
|
if (typeof cfg === "object") { |
|
|
|
|
|
rgb = cfg.rgb; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// check if already initialized
|
|
|
// check if already initialized
|
|
|
var done = $("#colors > div").length; |
|
|
var done = $("#colors > div").length; |
|
@ -1462,14 +1470,13 @@ function processData(data) { |
|
|
<!-- removeIf(!light)--> |
|
|
<!-- removeIf(!light)--> |
|
|
|
|
|
|
|
|
if ("rgb" === key) { |
|
|
if ("rgb" === key) { |
|
|
initColor(true); |
|
|
|
|
|
|
|
|
initColor({rgb: true}); |
|
|
$("input[name='color']").wheelColorPicker("setValue", value, true); |
|
|
$("input[name='color']").wheelColorPicker("setValue", value, true); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if ("hsv" === key) { |
|
|
if ("hsv" === key) { |
|
|
initColor(false); |
|
|
|
|
|
$("#brightness").hide(); |
|
|
|
|
|
|
|
|
initColor({hsv: true}); |
|
|
setPickerHSV(value); |
|
|
setPickerHSV(value); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|