jsTree does not reflect the hierarchy nesting
I have a jsTree that handles 2 levels.
The problem is that the parent and child开发者_StackOverflow社区 are both at the same level visually. You do need to expand the parent in order to see his children but it is shown in the same level - no nesting for some reason.
P.S: i'm using default-rtl theme.
Any idea?
I had the same issue but after looking at the source code and changing default value of RTL from false to true and everything has been changed to changed to RTL.
if you are using jsTree 1.0-rc3 , Revision: 236 or higher you must use
$('#MyTreeControl').jstree({ core: { 'rtl': true }});
using core: { 'rtl': true } is the key part.
here is a complete sample :
$('#MyTreeControl').jstree({
'themes' : {
'theme' : 'default-rtl',
'dots' : true,
'icons' : true
},
core: { 'rtl': true }});
The solution which is offered by Mr. Nevet has a problem. If you use plugins like Rename Treeview won't work properly.
Eventually I solved this problem by adding margin-right to the ul of the default-rtl theme css(style.css):
.jstree-default-rtl ul{
margin-right: 18px;
}
精彩评论