【问题标题】:How make frameset resize appropriately with jstree context menu如何使用 jstree 上下文菜单使框架集适当调整大小
【发布时间】:2016-03-21 13:37:41
【问题描述】:
我正在寻找如何在框架集中适当地调整框架大小的解决方案(不幸的是,我没有时间将旧版应用程序转换为不使用框架)。我在 IE 11 中有一个 jstree 树视图,其中上下文菜单被切断,因为框架没有一直调整大小。请注意以下 2 张图片:
上下文菜单被切断
上下文菜单未关闭,因为框架已手动调整大小。
我希望有以下可能的解决方案之一:
- 我可以在框架/css 中添加什么,以便在上下文菜单出现时框架自动调整大小?
- 我可以在框架/css 中添加什么以使上下文菜单与相邻框架重叠?
请帮忙。
【问题讨论】:
标签:
html
css
jstree
frameset
html4
【解决方案1】:
所以我能够找到一个解决方案,允许我在上下文菜单出现和消失时动态调整框架的大小(选项 2 似乎不可能)。我的 JavaScript 中的以下代码允许相应地驻留框架。
// when context menu is shown
$(document).bind('context_show.vakata', function (reference, element, position) {
$('#adjacentFrame', parent.document).attr('cols', '40%,60%');
});
// when context menu is hidden
$(document).bind('context_hide.vakata', function (reference, element, position) {
$('#adjacentFrame', parent.document).attr('cols', '30%,70%');
});