Revert "Fixed removal of all colors issue."

This reverts commit bc26132ce9.
This commit is contained in:
amritrai5757 2022-12-31 11:49:08 +00:00
parent ebdc020f9b
commit 9c8dd2d64e
1 changed files with 3 additions and 8 deletions

View File

@ -109,15 +109,10 @@ const PaletteBlock = (() => {
endIndex = tmp;
}
// Checks if user is trying to remove all the colours from the palette and gives an alert if so
if(coloursList.childElementCount > Math.abs(startIndex-endIndex)+1) {
for (let i=startIndex; i<=endIndex; i++) {
coloursList.removeChild(coloursList.children[startIndex]);
}
clearBorders();
} else {
alert("You can't remove all the colours from the palette!");
for (let i=startIndex; i<=endIndex; i++) {
coloursList.removeChild(coloursList.children[startIndex]);
}
clearBorders();
}
/** Starts selecting a ramp. Saves the data needed to draw the outline.