Added options object to toggle function.
This commit is contained in:
parent
70031d3bfa
commit
129672eb0f
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user