Added options object to toggle function.

This commit is contained in:
Severin Opel 2020-04-14 12:14:40 +02:00
parent 70031d3bfa
commit 129672eb0f

View File

@ -228,12 +228,12 @@ export default class Highlight extends Object {
} }
} }
static toggleHighlight(node) { static toggleHighlight(node, options = {}) {
console.log('toggleHighlight', Highlight._isExpanded(node)) console.log('toggleHighlight', Highlight._isExpanded(node))
if (Highlight._isExpanded(node)) { if (Highlight._isExpanded(node)) {
Highlight.closeHighlight(node) Highlight.closeHighlight(node, options)
} else { } else {
Highlight.openHighlight(node) Highlight.openHighlight(node, options)
} }
} }