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
    Join Date
    Jul 2009
    Posts
    30
    Vote Rating
    7
    da_bar is on a distinguished road

      0  

    Default [fixed] Aligning an Ext.Window

    [fixed] Aligning an Ext.Window


    I have two windows in my application that both open in a center by default, but I want to align them so that first opens aligned to the left of the screen ant the other to the right of the screen, so that windows are always aligned in a different resolutions. (x/y don't work in this case).

    Also is there a way that new window that will be opened, align his upper-left corner in the point (let's say 200px left and up from center of the screen) and every other opened window aligns 20px less than the first (to make that cascading windows look).

  2. #2
    Sencha User
    Join Date
    Jul 2009
    Posts
    30
    Vote Rating
    7
    da_bar is on a distinguished road

      0  

    Default


    I found a solution with this: var browserWidth = Ext.lib.Dom.getViewWidth();

    And for the other question I did it this way, if someone knows a better one please reply.

    Code:
    var xGlob = 200;
    var yGlob = 200;
    Ext.ux.Window = Ext.extend(Ext.Window, {
    
        constructor: function(config) 
        {
            var browserWidth = Ext.lib.Dom.getViewWidth();
            var browserHeight = Ext.lib.Dom.getViewHeight();
        
            var x = (browserWidth/2)-xGlob;
            var y = (browserHeight/2)-yGlob;
        
            config = Ext.apply({
                layout: 'fit',
                closable: true,
                closeAction: 'hide',
                resizable: true,
                draggable: true,
                x: x,
                y: y,
                plain: true,
                border: false,
                listeners:
                {
                    show: function()
                    {
                        xGlob = xGlob-20;
                        yGlob = yGlob-20;
                    }
                }
            }, config);
            
            Ext.ux.Window.superclass.constructor.call(this, config);
        }
    });