mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Added back brush with new tool system
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user