facebook-workplaceoutlookemailmicrosoft-teamsdiscordmessengercustom-servicesmacoslinuxwindowsinboxwhatsappicloudtweetdeckhipchattelegramhangoutsslackgmailskype
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
920 B
30 lines
920 B
9 years ago
|
/**
|
||
|
* The utility class to abstract different implementations to have the best performance when applying 2D translation
|
||
|
* on any DOM element.
|
||
|
*
|
||
|
* @private
|
||
|
*/
|
||
|
Ext.define('Ext.util.Translatable', {
|
||
|
requires: [
|
||
|
'Ext.util.translatable.CssTransform',
|
||
|
'Ext.util.translatable.ScrollPosition',
|
||
|
'Ext.util.translatable.ScrollParent',
|
||
|
'Ext.util.translatable.CssPosition'
|
||
|
],
|
||
|
|
||
|
constructor: function(config) {
|
||
|
var namespace = Ext.util.translatable;
|
||
|
|
||
|
switch (Ext.browser.getPreferredTranslationMethod(config)) {
|
||
|
case 'scrollposition':
|
||
|
return new namespace.ScrollPosition(config);
|
||
|
case 'scrollparent':
|
||
|
return new namespace.ScrollParent(config);
|
||
|
case 'csstransform':
|
||
|
return new namespace.CssTransform(config);
|
||
|
case 'cssposition':
|
||
|
return new namespace.CssPosition(config);
|
||
|
}
|
||
|
}
|
||
|
});
|