Added back brush with new tool system

This commit is contained in:
unsettledgames
2021-10-27 10:02:21 +02:00
parent 222228a6ce
commit 35cbe31a71
21 changed files with 217 additions and 125 deletions

View File

@@ -246,6 +246,8 @@ const ColorModule = (() => {
//if color is a string, then find the corresponding button
if (typeof color === 'string') {
if (color[0] === '#')
color = color.substr(1, color.length - 1);
//get all colors in palette
let colors = document.getElementsByClassName('color-button');
@@ -255,6 +257,7 @@ const ColorModule = (() => {
if (color == colors[i].jscolor.toString()) {
//set color to the color button
currentPalette.splice(i, 1);
color = colors[i];
break;
}