我有一个容器(布局是HBox),并希望在其左侧动态滑入一个面板(面板不应使用全屏宽度,但例如它的1/3)。
我无法让它工作。
这是我尝试过的:
Ext.define('MegatheriumProject.view.MainContainer', {
extend: 'Ext.Container',
alias: 'widget.maincontainerview',
requires: ['Ext.Container', 'Ext.TitleBar'],
config: {
layout: {
type: 'hbox',
animation: {
type: 'slide',
direction: 'right'
}
},
items: [
{
flex: 3,
xtype: 'titlebar',
title: 'Megatherium',
docked: 'top',
items: [
// some items
]
}
],
// some other configuration, listeners aso
这是我的导航面板,应滑入容器:
Ext.define('MegatheriumProject.view.NavigationPanel', {
extend: 'Ext.form.Panel',
alias: 'widget.navigationpanelview',
requires: ['Ext.form.Panel'],
config: {
flex: 1,
// some other config
这是我尝试添加它的方法:
showNavigation: function() {
this.getMainContainerView().add(this.getNavigationPanelView());
},
。但事实证明,它出现了,但没有动画化,也没有使用 Flex。
有什么帮助吗?
最好的问候,
马丁
这里有一种方法可以做到这一点:
http://www.senchafiddle.com/#Qh35F
希望这有帮助
感谢 TDeBailleul,它以这种方式工作,但并不是我想要;)的确切内容。
我也希望标题栏被动画化并滚动起来。
wnielson的导航侧边栏:)为我做到了。