Skip to content

Instantly share code, notes, and snippets.

@mitchellsimoens
Created May 22, 2013 15:59
Show Gist options
  • Save mitchellsimoens/5628722 to your computer and use it in GitHub Desktop.
Save mitchellsimoens/5628722 to your computer and use it in GitHub Desktop.
fullscreen config from ST2 comes to Ext JS 4 (unofficially)
Ext.define('Override.AbstractComponent', {
override : 'Ext.AbstractComponent',
fullscreen : false,
constructor : function() {
var me = this,
viewport = Ext.Viewport;
me.callParent(arguments);
if (viewport && me.fullscreen && !me.dock) {
viewport.add(me);
}
}
});
Ext.define('Override.app.Application', {
override : 'Ext.app.Application',
requires : 'Ext.container.Viewport',
viewport : null,
constructor : function() {
var config = this.viewport,
viewport = Ext.Viewport;
if (config && !(viewport instanceof Ext.container.Viewport)) {
Ext.Viewport = new Ext.container.Viewport(config);
}
this.callParent(arguments);
}
});
Ext.application({
name : 'Test',
requires : [
'Ext.panel.Panel'
],
viewport : {
layout : 'card'
},
launch : function() {
new Ext.panel.Panel({
fullscreen : true,
frame : true,
title : 'Panel',
html : 'hello'
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment