Results 1 to 6 of 6

Thread: Ext.draw.Component extension

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User Mycoding's Avatar
    Join Date
    May 2010
    Location
    Russia, Volgograd
    Posts
    460
    Vote Rating
    0
      0  

    Default Answered: Ext.draw.Component extension

    Please help me to do very simple extention on base of Ext.draw.Component

    I try to do this but it doesn't work
    Code:
    Ext.define('Ext.testcircle',{
    	alias: 'widget.testcircle',
    	extend: 'Ext.draw.Component',
    	requires:[
    		'Ext.draw.*'
    	],
    	constructor:function(config){
    		Ext.applyIf(config,{
    			items:[{
    				type: 'circle',
    				fill: '#79BB3F',
    				radius: 100,
    				x: 100,
    				y: 100
    			}]
    		});
    		this.callParent([config]);
    	}
    });
    
    
    		Ext.create('Ext.Window', {
    			width: 215,
    			height: 235,
    			layout: 'fit',
    			items: [new Ext.testcircle()]
    		}).show();

  2. You need to move the Ext.create() call inside an Ext.onReady().

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •