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;
|
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.
|
||||||
|
|
Loading…
Reference in New Issue