Hi,
I'm currently learning to create my plugin, and I've came across a question, let's say my plugin code:
PHP Code:
Ext.define('Ext.plugin.MyPlugin', {
extend: 'Ext.Component',
xtype: 'plugin-myplugin',
config: {
speed: 12,
animationType: {
direction: 'left',
type: 'flip'
}
},
init: function() { },
someFunction: function() { }
});
I understand that in the functions, I can access the 'speed' properties by using this.getSpeed(), or setter as in this.setSpeed(123), but how to I update the direction for the animationType property?
I've try to do this.setAnimationType({direction: 'right'}) , then when I do this.getAnimationType(), it return me only the object with direction: 'right'. If I do Ext.apply(this.getAnimationType(), {direction: 'right'}), it will return me Ext.Object.classify.objectClass with the following properties (using console.log to observe in Google Chrome's developer tools)
PHP Code:
direction: 'right',
__proto__: Object
direction: 'left'
type: 'flip'
__proto__: Object
May I know what is the proper way of updating the value for the properties object?
Thanks.