apply the clicked color

This commit is contained in:
tophf 2020-10-18 14:35:23 +03:00
parent 4502c47c82
commit 495a682d35

View File

@ -585,8 +585,9 @@
function onPaletteClicked(e) {
if (e.target !== e.currentTarget) {
e.preventDefault();
if (!e.button) {
setColor(e.target.__color);
if (!e.button && setColor(e.target.__color)) {
userActivity = performance.now();
colorpickerCallback();
} else if (e.button === 2 && options.paletteCallback) {
options.paletteCallback(e.target);
}