Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
5f1c6541
Commit
5f1c6541
authored
Mar 13, 2018
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save keyPath for reference and not key
parent
cf8a444d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
TreeView.js
remix-debugger/src/ui/TreeView.js
+6
-6
No files found.
remix-debugger/src/ui/TreeView.js
View file @
5f1c6541
...
@@ -77,32 +77,32 @@ class TreeView {
...
@@ -77,32 +77,32 @@ class TreeView {
formatData
(
key
,
data
,
children
,
expand
,
keyPath
)
{
formatData
(
key
,
data
,
children
,
expand
,
keyPath
)
{
var
self
=
this
var
self
=
this
var
li
=
yo
`<li key=
${
key
}
class=
${
css
.
li_tv
}
></li>`
var
li
=
yo
`<li key=
${
key
Path
}
class=
${
css
.
li_tv
}
></li>`
var
caret
=
yo
`<div class="fa fa-caret-right caret
${
css
.
caret_tv
}
"></div>`
var
caret
=
yo
`<div class="fa fa-caret-right caret
${
css
.
caret_tv
}
"></div>`
var
label
=
yo
`
var
label
=
yo
`
<div key=
${
key
}
class=
${
css
.
label_tv
}
>
<div key=
${
key
Path
}
class=
${
css
.
label_tv
}
>
${
caret
}
${
caret
}
<span>
${
self
.
formatSelf
(
key
,
data
,
li
)}
</span>
<span>
${
self
.
formatSelf
(
key
,
data
,
li
)}
</span>
</div>`
</div>`
li
.
appendChild
(
label
)
li
.
appendChild
(
label
)
if
(
data
.
children
)
{
if
(
data
.
children
)
{
var
list
=
yo
`<ul key=
${
key
}
class=
${
css
.
ul_tv
}
>
${
children
}
</ul>`
var
list
=
yo
`<ul key=
${
key
Path
}
class=
${
css
.
ul_tv
}
>
${
children
}
</ul>`
list
.
style
.
display
=
'none'
list
.
style
.
display
=
'none'
caret
.
className
=
list
.
style
.
display
===
'none'
?
`fa fa-caret-right caret
${
css
.
caret_tv
}
`
:
`fa fa-caret-down caret
${
css
.
caret_tv
}
`
caret
.
className
=
list
.
style
.
display
===
'none'
?
`fa fa-caret-right caret
${
css
.
caret_tv
}
`
:
`fa fa-caret-down caret
${
css
.
caret_tv
}
`
label
.
onclick
=
function
()
{
label
.
onclick
=
function
()
{
self
.
expand
(
keyPath
)
self
.
expand
(
keyPath
)
}
}
label
.
oncontextmenu
=
function
(
event
)
{
label
.
oncontextmenu
=
function
(
event
)
{
self
.
event
.
trigger
(
'nodeRightClick'
,
[
key
,
data
,
label
,
event
])
self
.
event
.
trigger
(
'nodeRightClick'
,
[
key
Path
,
data
,
label
,
event
])
}
}
li
.
appendChild
(
list
)
li
.
appendChild
(
list
)
}
else
{
}
else
{
caret
.
style
.
visibility
=
'hidden'
caret
.
style
.
visibility
=
'hidden'
label
.
oncontextmenu
=
function
(
event
)
{
label
.
oncontextmenu
=
function
(
event
)
{
self
.
event
.
trigger
(
'leafRightClick'
,
[
key
,
data
,
label
,
event
])
self
.
event
.
trigger
(
'leafRightClick'
,
[
key
Path
,
data
,
label
,
event
])
}
}
label
.
onclick
=
function
(
event
)
{
label
.
onclick
=
function
(
event
)
{
self
.
event
.
trigger
(
'leafClick'
,
[
key
,
data
,
label
,
event
])
self
.
event
.
trigger
(
'leafClick'
,
[
key
Path
,
data
,
label
,
event
])
}
}
}
}
return
li
return
li
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment