1. #1
    Sencha User
    Join Date
    Feb 2010
    Posts
    125
    Answers
    7
    Vote Rating
    1
    börn is on a distinguished road

      0  

    Question Unanswered: Some Problems around Ext.draw.Component

    Unanswered: Some Problems around Ext.draw.Component


    Hello there,

    I'm currently running into some problems with ext drawing. I use the following code for adding Sprites to a draw component and I'm a bit confused.

    First I noticed that the only solid thing is to render the draw component to body or a <div> - when adding the component to a panel, i did not see anything (is this wanted behaviour?).

    Second I want to add Sprites to an existing draw component by using the surface container in it like in the code below. That works, but I see a reserved space above the sprite I added later to the surface!

    I'm also having problems in overriding the draw component and adding items in the constructor or initComponent function. Any clues about that?

    TIA
    börn

    Code:
    paper = Ext.create('Ext.draw.Component', {
                              width: 300,
                              height: 300,
                              autoShow: true,
                              viewBox: false,
                              //items: {dont wanted yet}
                              renderTo: 'content'
                            });
    
    
                            paper.createSurface();   //<-- failure!
    
    
                            Ext.define('Test.Control.Event', {
                              extend: 'Ext.draw.Sprite',
    
    
                              constructor: function()
                              {
                                this.callParent([
                                                  {
                                                    type: 'circle',
                                                    fill: '#FCCEED',
                                                    radius: 30,
                                                    x: 50,
                                                    y: 50,
                                                    surface: paper.surface
                                                  }
                                                ]);
                              }
                            });
    
    
                            var s = paper.surface.add(new Test.Control.Event());
                            s.show(true);

  2. #2
    Sencha User
    Join Date
    Feb 2010
    Posts
    125
    Answers
    7
    Vote Rating
    1
    börn is on a distinguished road

      0  

    Default


    Damn... Okay - the second problem was around "paper.createSurface()". By this a second surface is created for the component - my problem was, when not inserting items directly, the surface wasn't defined... but now that works somehow.

    But the other problems I raised are still annoying

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar