Apr 24, 2015, 11:34 AM
Hi, just to post a small fix in the prior posted fireResize function, the callParent should be called after the assignments to the local variables in order to enable the correct resizing:
(function () {
var h = customGetViewportHeight();
var w = customGetViewportWidth();
function customGetViewportHeight() {
return Ext.isIE9m ? document.documentElement.clientHeight : window.innerHeight;
}
function customGetViewportWidth() {
return (!Ext.isStrict && !Ext.isOpera) ? document.body.clientWidth : Ext.isIE9m ? document.documentElement.clientWidth : window.innerWidth;
}
Ext.define('Ext.overrides.GlobalEvents', {
override: 'Ext.GlobalEvents',
fireResize: function () {
w = customGetViewportWidth(),
h = customGetViewportHeight();
this.callParent(arguments);
}
});
Ext.define('Ext.overrides.dom.Element', {
override: 'Ext.dom.Element',
statics: {
getViewportHeight: function () {
return h;
},
getViewportWidth: function () {
return w;
}
}
});
})();