This commit is contained in:
Nicola
2021-12-12 18:37:16 +01:00
parent 1bac62be4c
commit be852d9aae
8 changed files with 109 additions and 64 deletions

View File

@ -354,7 +354,7 @@ const ColorPicker = (() => {
function movePickerIcon(event) {
event.preventDefault();
if (event.which == 1 || draggingCursor) {
if (event.buttons == 1 || draggingCursor) {
let cursorPos = getCursorPosMinipicker(event);
let canvasRect = miniPickerCanvas.getBoundingClientRect();
@ -507,6 +507,10 @@ const ColorPicker = (() => {
styles[1] += "background: linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(0,0,0,1) 0%, " +
"rgba(" + rgb.r + "," + rgb.g + "," + rgb.b + ",1) 100%);}";
styles[1] += "input[type=range]#cp-minipicker-slider::-moz-range-track { background: rgb(2,0,36);";
styles[1] += "background: linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(0,0,0,1) 0%, " +
"rgba(" + rgb.r + "," + rgb.g + "," + rgb.b + ",1) 100%);}";
updateMiniPickerSpectrum();
updateStyles();
}