From 8743bd8549be4603cc14f2ee9a0ce7dec9c8b787 Mon Sep 17 00:00:00 2001 From: unsettledgames <47360416+unsettledgames@users.noreply.github.com> Date: Tue, 16 Jun 2020 16:04:36 +0200 Subject: [PATCH] Fixed colour picker bug When the user changed a selected colour, the stroke colour became one of the two checkerboard colours. --- js/_clickedColor.js | 6 ++++-- js/_colorChanged.js | 16 +++++++++++----- js/_move.js | 1 - js/_newPixel.js | 4 ++-- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/js/_clickedColor.js b/js/_clickedColor.js index 57566ce..f09ef07 100644 --- a/js/_clickedColor.js +++ b/js/_clickedColor.js @@ -8,9 +8,11 @@ function clickedColor (e){ if (selectedColor) selectedColor.classList.remove('selected'); //set current color - currentLayer.context.fillStyle = this.style.backgroundColor; - currentGlobalColor = this.style.backgroundColor; + for (let i=1; i