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

View File

@@ -109,15 +109,10 @@ const PaletteBlock = (() => {
endIndex = tmp; 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++) { for (let i=startIndex; i<=endIndex; i++) {
coloursList.removeChild(coloursList.children[startIndex]); coloursList.removeChild(coloursList.children[startIndex]);
} }
clearBorders(); clearBorders();
} else {
alert("You can't remove all the colours from the palette!");
}
} }
/** Starts selecting a ramp. Saves the data needed to draw the outline. /** Starts selecting a ramp. Saves the data needed to draw the outline.