add itemAt function

pull/7/head
yann300 7 years ago
parent a33693f438
commit 28073acf6b
  1. 6
      remix-debugger/src/ui/TreeView.js

@ -77,7 +77,7 @@ class TreeView {
formatData (key, data, children, expand, keyPath) {
var self = this
var li = yo`<li class=${css.li_tv}></li>`
var li = yo`<li key=${key} class=${css.li_tv}></li>`
var caret = yo`<div class="fa fa-caret-right caret ${css.caret_tv}"></div>`
var label = yo`
<div key=${key} class=${css.label_tv}>
@ -127,6 +127,10 @@ class TreeView {
}
}
itemAt (path) {
return this.view.querySelector(`li[key="${path}"]`)
}
labelAt (path) {
return this.view.querySelector(`div[key="${path}"]`)
}

Loading…
Cancel
Save