Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Mar 2011
    Location
    Germany
    Posts
    198
    Vote Rating
    1
    Nickname is on a distinguished road

      0  

    Default [FIXED-EXTJSIV-445] Ext.draw.Component: Render Items Config not rendered right

    [FIXED-EXTJSIV-445] Ext.draw.Component: Render Items Config not rendered right


    Hi,

    didn't find any matching bug, so opening a new one:

    Using the SVG Tiger Example, removed items config and replaced it with a simple circle config

    Result:
    Circle is fit into the Ext.draw.Component instead of using the configured x,y,radius

    Expected Result:
    From the example code below: A circle should be placed with center point at [100,100] and a radius of 30

    PHP Code:
    var cmp Ext.create('Ext.draw.Component', {
        
    width400,
        
    height400,
        
    draggable: {
            
    constraintrue
        
    },
        
    floatingtrue,
        
    renderToExt.getBody(),
        
    items: [{
            
    type"circle",
            
    x100,
            
    y100,
            
    radius30,
            
    stroke:"#000",
            
    fill:"#fff"
        
    }]
    }); 
    Workaround:
    Don't configure items and add them later to the surface

    PHP Code:
    // now create the circle
    // now create the circle
    var circle cmp.surface.add(Ext.create('Ext.draw.Sprite', {
            
    type"circle",
            
    x100,
            
    y100,
            
    radius30,
            
    stroke:"#000",
            
    fill:"#fff",
            
    surfacecmp.surface // <-- Need to add surface, even if we add an item to a surface?!
    }));
    circle.show(true); // and show it 

    Edit:
    Thread title is not good, should be something like "Rendering primitives from items config". sorry.
    I cannot change it.

  2. #2
    Sencha User
    Join Date
    Mar 2011
    Posts
    114
    Vote Rating
    6
    johanhaest is on a distinguished road

      0  

    Default


    Try setting viewBox: false in your draw.Component.
    This should fix your problem normally. I've had this problem too where it streches the items in your surface to fill the surface completely. When I added them like you this was indeed fixed.
    But the viewBox on false seems to work aswell.

  3. #3
    Sencha User
    Join Date
    Mar 2011
    Location
    Germany
    Posts
    198
    Vote Rating
    1
    Nickname is on a distinguished road

      0  

    Default


    Thank you. Problem solved.

    I read the JsDoc for the 'viewBox', but I didn't expect that it will overwrite a defined parameter like radius for circles and width/height for rectangles. I thought it will scale, if this informations are missing it will scale.

    PHP Code:
    /**
     * @cfg {Boolean} viewBox
     * Turn on view box support which will scale and position items in the draw component to fit to the component while
     * maintaining aspect ratio. Defaults to true.
     */
    viewBoxtrue

  4. #4
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    20
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    I'll change the documentation to be more clear.

  5. #5
    Sencha User steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,664
    Vote Rating
    7
    steffenk has a spectacular aura about steffenk has a spectacular aura about steffenk has a spectacular aura about

      0  

    Default


    and maybe set it to false by default? This setting is something you should activate on need, not deactivate.
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  6. #6
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    20
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    We may change this before release it's gone back and forth a couple times during development...

Similar Threads

  1. [FIXED-EXTJSIV-191] Component.js typos
    By LesJ in forum Ext:Bugs
    Replies: 1
    Last Post: 21 Mar 2011, 3:12 PM
  2. Replies: 1
    Last Post: 18 Mar 2011, 9:35 AM
  3. Replies: 1
    Last Post: 17 Mar 2011, 4:16 PM
  4. Replies: 3
    Last Post: 5 Oct 2009, 3:02 PM
  5. Replies: 2
    Last Post: 10 Sep 2008, 11:50 PM

Thread Participants: 3

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi