mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Whops fixed bug in duplicating layers
It's .children, not .childNodes, the second one also returns text elements (like \ns)
This commit is contained in:
parent
2a5315b81a
commit
c27a355904
@ -13,11 +13,9 @@ The next version is mostly focused on adding missing essential features and port
|
|||||||
Suggestions / Planned features:
|
Suggestions / Planned features:
|
||||||
|
|
||||||
- Line tool
|
- Line tool
|
||||||
- Resize canvas
|
|
||||||
- Resize sprite
|
- Resize sprite
|
||||||
- Load palette from LPE file
|
- Load palette from LPE file
|
||||||
- Move colours in (advanced) palette editor
|
- Move colours in (advanced) palette editor
|
||||||
- Duplicate layer
|
|
||||||
- Symmetry options
|
- Symmetry options
|
||||||
|
|
||||||
- Custom color picker
|
- Custom color picker
|
||||||
|
@ -463,7 +463,7 @@ function deleteLayer(saveHistory = true) {
|
|||||||
function duplicateLayer(event, saveHistory = true) {
|
function duplicateLayer(event, saveHistory = true) {
|
||||||
let layerIndex = layers.indexOf(currentLayer);
|
let layerIndex = layers.indexOf(currentLayer);
|
||||||
let toDuplicate = currentLayer;
|
let toDuplicate = currentLayer;
|
||||||
let menuEntries = layerList.childNodes
|
let menuEntries = layerList.children;
|
||||||
|
|
||||||
// Increasing z-indexes of the layers above
|
// Increasing z-indexes of the layers above
|
||||||
for (let i=getMenuEntryIndex(menuEntries, toDuplicate.menuEntry) - 1; i>0; i--) {
|
for (let i=getMenuEntryIndex(menuEntries, toDuplicate.menuEntry) - 1; i>0; i--) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user