remove nodeIsExpanded

pull/1/head
yann300 7 years ago
parent ea15e2e60c
commit 8746cf7912
  1. 3
      remix-debugger/src/ui/TreeView.js

@ -44,7 +44,6 @@ class TreeView {
this.extractData = opts.extractData || this.extractDataDefault
this.formatSelf = opts.formatSelf || this.formatSelfDefault
this.view = null
this.nodeIsExpanded = {}
this.nodes = {}
this.labels = {}
this.carets = {}
@ -90,11 +89,11 @@ class TreeView {
</div>`
li.appendChild(label)
if (data.children) {
var isExpanded = self.nodeIsExpanded[keyPath]
var list = yo`<ul class=${css.ul_tv}>${children}</ul>`
this.nodes[keyPath] = list
this.labels[keyPath] = label
this.carets[keyPath] = caret
list.style.display = 'none'
caret.className = list.style.display === 'none' ? 'fa fa-caret-right' : 'fa fa-caret-down'
label.onclick = function () {
self.expand(keyPath)

Loading…
Cancel
Save