Skip to content

Commit

Permalink
#270 Fix nested header expansion - quickfix
Browse files Browse the repository at this point in the history
  • Loading branch information
tariqksoliman committed Mar 29, 2024
1 parent 87069e9 commit ab8bcea
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/essence/Tools/Layers/LayersTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,16 @@ var LayersTool = {
if (t.attr('depth') <= elmDepth[currentHeaderIdx]) {
if (currentHeaderIdx <= 0) done = true
else {
elmDepth.pop()
wasOn.pop()
currentHeaderIdx--
while (t.attr('depth') <= elmDepth[currentHeaderIdx]) {
elmDepth.pop()
wasOn.pop()
currentHeaderIdx--

if (currentHeaderIdx < 0) {
done = true
break
}
}
}
}
if (!done) {
Expand Down

0 comments on commit ab8bcea

Please sign in to comment.