Skip to content

Commit ddae665

Browse files
committed
iconPlace=end is moved to suffix_container from li_container
1 parent 7d0e464 commit ddae665

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

dist/js/tree.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,6 @@ class NavTree {
9696
})
9797
}
9898

99-
icon_link.appendChild(icon)
100-
icon_container.appendChild(icon_link)
101-
if(this.props.iconPlace == "start"){
102-
prefix_container.appendChild(icon_container)
103-
} else {
104-
li_container.appendChild(icon_container)
105-
}
106-
10799
var prevs = []
108100
var prev = li_container
109101
while(prev = prev.previousSibling){
@@ -141,6 +133,14 @@ class NavTree {
141133
})
142134

143135
li_container.append(suffix_container)
136+
137+
icon_link.appendChild(icon)
138+
icon_container.appendChild(icon_link)
139+
if(this.props.iconPlace == "start"){
140+
prefix_container.appendChild(icon_container)
141+
} else {
142+
suffix_container.appendChild(icon_container)
143+
}
144144
})
145145

146146
if(this.props.searchable) {

example/static/js/tree.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,6 @@ class NavTree {
9696
})
9797
}
9898

99-
icon_link.appendChild(icon)
100-
icon_container.appendChild(icon_link)
101-
if(this.props.iconPlace == "start"){
102-
prefix_container.appendChild(icon_container)
103-
} else {
104-
li_container.appendChild(icon_container)
105-
}
106-
10799
var prevs = []
108100
var prev = li_container
109101
while(prev = prev.previousSibling){
@@ -141,6 +133,14 @@ class NavTree {
141133
})
142134

143135
li_container.append(suffix_container)
136+
137+
icon_link.appendChild(icon)
138+
icon_container.appendChild(icon_link)
139+
if(this.props.iconPlace == "start"){
140+
prefix_container.appendChild(icon_container)
141+
} else {
142+
suffix_container.appendChild(icon_container)
143+
}
144144
})
145145

146146
if(this.props.searchable) {

0 commit comments

Comments
 (0)