Skip to content

Instantly share code, notes, and snippets.

@olizilla olizilla/foo.ext3.js
Last active Dec 11, 2015

Embed
What would you like to do?
A proposal for an ExtJS 3 component initialisation pattern.
Ext.namespace('foo');
foo.UpdatePositionDialog = Ext.extend(Ext.Window, {
/**
* @param {Object} config Instance configuration options
*/
constructor:function (config) {
// Merge the incoming config with the defaults. Externally provided properties take precedence.
config = Ext.apply({
cls:'UpdatePositionDialog',
width:600,
height:'auto'
},
config || {}); // Alas Ext is still a bit rubbish so we have to guard against a null config
foo.UpdatePositionDialog.superclass.constructor.call(this, config);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.