Jstree:隐藏的节点仍然可见

时间:2012-06-04 11:07:46

标签: javascript jquery-plugins jstree

我从jstree插件开始,我遇到了问题。

我不知道为什么,但总是会显示节点,即使我将它们折叠起来。

加载树时,节点关闭,树看起来像这样:

enter image description here

我打开第一个节点,树看起来像这样:

enter image description here

并且,当我关闭(折叠)之前打开的节点时,它看起来像这个(父节点似乎已关闭,但其子节点可见):

enter image description here

jsTree版本是pre1.0 stable(从here下载)

我用我的应用程序生成的JSON数据是:

[
{   "data" : "Parent ...",
    "state" : "closed",
    "attr" : {
        "id": "parentID", 
        "rel": "line", 
        "class": "jstree-unchecked"
    },
    "children": [
                {   "data" : "proposal1 . . .",
                    "state" : "closed",
                    "attr" : { 
                            "id": "prop1", 
                            "rel": "proposal", 
                            "class": "jstree-checked jstree-leaf" 
                            }
                },
                {   "data" : "proposal2 . . .",
                    "state" : "closed",
                    "attr" : { 
                            "id": "prop2", 
                            "rel": "proposal", 
                            "class": "jstree-unchecked jstree-leaf" 
                    }
                }
                ]
}]

最后,创建树的jsTree脚本部分是:

$("#propuestas").jstree({
                "json_data" : {
                    "data" :vewJson,
                    "progressive_render" : true
                }
                ,
                "ui" : {
                        "select_limit" : -1,
                        "real_checkboxes" : true
                        },

                "plugins" : [ "themes", "json_data","checkbox", "ui"]

            });

为什么父节点已打开?为什么子/叶节点可见?

非常感谢任何帮助。我很困惑。

提前致谢。

1 个答案:

答案 0 :(得分:1)

这里有一个类似的帖子/修复:display flaw for IE8/9。它看起来像是一个doctype问题。

相关问题