Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User alei.alhepSoft's Avatar
    Join Date
    Aug 2010
    Location
    Cajamarca
    Posts
    35
    Vote Rating
    1
    alei.alhepSoft is on a distinguished road

      0  

    Question MIGRATE DRAWING FROM ExtJs-3 + Raphael TO ExtJs4

    MIGRATE DRAWING FROM ExtJs-3 + Raphael TO ExtJs4


    Hellow!
    I'm migrating my application from ExtJs 3 to ExtJs 4.
    For drawing in my application I was using Raphael, now I want use the API of drawing that comes with ExtJs 4.
    My problem is that I need extend the Ext.draw.Component for draw an especific set of graphic objects so that the components change of size dinamically when the draw component is resized. I implemented the next code:
    Code:
    Ext.define("MyApp.Drawing.CirclePainter",{
        extend:"Ext.draw.Component",
    ....
        afterComponentLayout: function(w,h){
                  var xc=w/3, yc=h/3;
                  radius=Math.min(w,h)/2;
                   this.surface.add({         
                type: 'circle',
                fill: '#ffc',
                radius: 100,
                x: xc,
                y: yc
            });
    ...
        }
    })
    for test this class i use the next code:
    Code:
            Ext.onReady(function(){
                circlePainter= Ext.create("MyApp.Drawing.CirclePainter",{})
                Ext.create('Ext.Window', {
                    width: 640,height: 480,
                    title:"testCirclePainter",
                    layout: 'fit',
                    items: [circlePainter]
                }).show();
    
    
            })
    however, this not works!
    someone know why when I invoque the method add of the surface nothing happens?

    in despite of that, if previously the draw component contains elements,and invoque the method removeAll on the afterComponentLayout overrided method, all the components are removed.

    Is very strange that I can remove elements, but don't create elements dinamically!

  2. #2
    Sencha User alei.alhepSoft's Avatar
    Join Date
    Aug 2010
    Location
    Cajamarca
    Posts
    35
    Vote Rating
    1
    alei.alhepSoft is on a distinguished road

      1  

    Thumbs up I HAVE IT!

    I HAVE IT!


    Alei,
    The component is adding the item but is not redrawing.
    For make redraw do the next:
    Code:
    	sprite = this.surface.add({
    			type: 'circle',
    			fill: '#FF8040',
    			radius: 50,
    			x: 100,
    			y: 100
    		});
    		sprite.setAttributes(null,true)
    the second parameter of setAttributes makes the sprite redraw.