Results 1 to 2 of 2

Thread: Draw component item disappears after a few seconds

  1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    56
    Answers
    4
    Vote Rating
    1
      0  

    Default Draw component item disappears after a few seconds

    Hi,

    This might be a dumb question, but I'm starting out with Sencha Touch Charts 2 and I am running into the problem when I add "Ext.draw.Component" to a panel with two circles, like this:

    Code:
                initialize: function(c){
                    var drawComponent = new Ext.draw.Component({
                        items: [
                            {
                                type: 'circle',
                                fill: '#ffffff',
                                radius: 5,
                                x: 100,
                                y: 100
                            },
                            {
                                type: 'circle',
                                fill: '#ffffff',
                                radius: 5,
                                x: 120,
                                y: 100
                            }
                        ]
                    });
    
    
                    this.add(drawComponent);
    }
    The problem is that a few seconds after the circles are rendered, they simply disappear. I do not understand since it's not as if the panel is being refreshed or repainted or something of that nature, I do nothing at all with the app and the circles disappear.

    Any ideas ?

    Thanks in advance for your help

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    First thing that jumps out at me is you are overriding initialize method but not calling

    Code:
    this.callParent();
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Posting Permissions

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