From b5a850bbeea9e5ca3bab3b8bdc4a8d4408daa774 Mon Sep 17 00:00:00 2001 From: Harley White Date: Sun, 30 May 2021 23:33:56 -0400 Subject: [PATCH] Fixed minor oddities --- changelog.md | 3 +++ demo.html | 6 +++--- js/technical/layerSupport.js | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) 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