mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Fixed removal of all the colors from palette
This commit is contained in:
parent
d9bde9bee6
commit
901fdced90
@ -109,10 +109,17 @@ const PaletteBlock = (() => {
|
||||
endIndex = tmp;
|
||||
}
|
||||
|
||||
for (let i=startIndex; i<=endIndex; i++) {
|
||||
coloursList.removeChild(coloursList.children[startIndex]);
|
||||
if(coloursList.childElementCount > Math.abs(startIndex-endIndex)+1) {
|
||||
for (let i=startIndex; i<=endIndex; i++) {
|
||||
coloursList.removeChild(coloursList.children[startIndex]);
|
||||
}
|
||||
clearBorders();
|
||||
} else if(coloursList.childElementCount > 1){
|
||||
for (let i=startIndex; i<endIndex; i++) {
|
||||
coloursList.removeChild(coloursList.children[startIndex]);
|
||||
}
|
||||
clearBorders();
|
||||
}
|
||||
clearBorders();
|
||||
}
|
||||
|
||||
/** Starts selecting a ramp. Saves the data needed to draw the outline.
|
||||
|
Loading…
Reference in New Issue
Block a user