Unfold all the folds intersecting the row when clicking fold indicators

This commit is contained in:
Antonio Scandurra
2016-04-26 13:00:23 +02:00
parent 38bd120fb1
commit 7ba9cc6329
2 changed files with 33 additions and 2 deletions

View File

@@ -93,9 +93,9 @@ class LineNumberGutterComponent extends TiledComponent
{target} = event
lineNumber = target.parentNode
if target.classList.contains('icon-right') and lineNumber.classList.contains('foldable')
if target.classList.contains('icon-right')
bufferRow = parseInt(lineNumber.getAttribute('data-buffer-row'))
if lineNumber.classList.contains('folded')
@editor.unfoldBufferRow(bufferRow)
else
else if lineNumber.classList.contains('foldable')
@editor.foldBufferRow(bufferRow)