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:
@ -109,10 +109,17 @@ const PaletteBlock = (() => {
|
|||||||
endIndex = tmp;
|
endIndex = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i=startIndex; i<=endIndex; i++) {
|
if(coloursList.childElementCount > Math.abs(startIndex-endIndex)+1) {
|
||||||
coloursList.removeChild(coloursList.children[startIndex]);
|
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.
|
/** Starts selecting a ramp. Saves the data needed to draw the outline.
|
||||||
|
Reference in New Issue
Block a user