PDA

View Full Version : dockedItems hide() does not let underneat item to be drawn. only RemoveDocked() work



pothibo
24 Feb 2011, 9:59 AM
It would be fine however, removedDocked doesn't have any kind of animation.

mitchellsimoens
24 Feb 2011, 1:49 PM
Just simply as a test...


var cmp = new Ext.Panel({
fullscreen: true,
dockedItems: [
{
xtype: "toolbar",
dock: "top",
title: "Hide",
listeners: {
beforehide: function(tb) {
tb.thisHeight = tb.getHeight();
},
hide: function(tb) {
var body = cmp.body;
var top = parseInt(body.getStyle("top"));
body.setStyle({
top: top - tb.thisHeight + "px",
height: body.getHeight() + tb.thisHeight + "px"
});
},
show: function(tb) {
var body = cmp.body;
var top = parseInt(body.getStyle("top"));
body.setStyle({
top: top + tb.thisHeight + "px",
height: body.getHeight() - tb.thisHeight + "px"
});
}
}
}
],
html: "Test"
});

setTimeout(function() {
var dock = cmp.getDockedComponent(0);
dock.hide({
type: "fade"
});
}, 1000);

setTimeout(function() {
var dock = cmp.getDockedComponent(0);
dock.show({
type: "fade"
});
}, 3000);