apply the clicked color
This commit is contained in:
parent
4502c47c82
commit
495a682d35
|
@ -585,8 +585,9 @@
|
||||||
function onPaletteClicked(e) {
|
function onPaletteClicked(e) {
|
||||||
if (e.target !== e.currentTarget) {
|
if (e.target !== e.currentTarget) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (!e.button) {
|
if (!e.button && setColor(e.target.__color)) {
|
||||||
setColor(e.target.__color);
|
userActivity = performance.now();
|
||||||
|
colorpickerCallback();
|
||||||
} else if (e.button === 2 && options.paletteCallback) {
|
} else if (e.button === 2 && options.paletteCallback) {
|
||||||
options.paletteCallback(e.target);
|
options.paletteCallback(e.target);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user