mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Revert "Fixed removal of all colors issue."
This reverts commit bc26132ce9
.
This commit is contained in:
parent
ebdc020f9b
commit
9c8dd2d64e
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user