diff --git a/changelog.md b/changelog.md index 745b993..9317d70 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ # The Modding Tree changelog: +- Fixed demo.html +- Fixed certain things skipping negative rows (now they are treated like non-numeric rows, and don't appear in the tree still). + ### v2.5.11.1 - 5/27/21 - Fixed issues caused when the tree tab is disabled. diff --git a/demo.html b/demo.html index b5264a5..71cc528 100644 --- a/demo.html +++ b/demo.html @@ -10,9 +10,9 @@ - - - + + + diff --git a/js/technical/layerSupport.js b/js/technical/layerSupport.js index 1266f50..f8412c6 100644 --- a/js/technical/layerSupport.js +++ b/js/technical/layerSupport.js @@ -200,7 +200,7 @@ function setupLayer(layer){ ROW_LAYERS[row][layer]=layer; let position = (layers[layer].position !== undefined ? layers[layer].position : layer) - if (!isNaN(displayRow)) TREE_LAYERS[displayRow].push({layer: layer, position: position}) + if (!isNaN(displayRow) || displayRow < 0) TREE_LAYERS[displayRow].push({layer: layer, position: position}) else OTHER_LAYERS[displayRow].push({layer: layer, position: position}) if (maxRow < layers[layer].displayRow) maxRow = layers[layer].displayRow