1. #1
    Sencha User
    Join Date
    Jul 2009
    Posts
    56
    Vote Rating
    0
    omermx is on a distinguished road

      0  

    Question How to override the direction in which Ext.Panel expands - slide upwards?

    How to override the direction in which Ext.Panel expands - slide upwards?


    Hi, I am developing a little component that incorporates a panel that slides out like an editor when modifying a gridpanel element. However some times the panel is too big when editing an item towards the bottom of the page and goes out of the browser window.

    I have created a method to check whether the panel is out of bounds, and in this case the panel should slide upwards.

    Had a dig around the API and found the onExpand code, and think slideIn is defined in Ext.Fx. Does anyone have experience of changing the slide direction for expanding a panel??



    Code:
    // private
        onExpand : function(doAnim, animArg){
            if(doAnim){
                this[this.collapseEl].slideIn(this.slideAnchor,            <----------
                        Ext.apply(this.createEffect(animArg||true, this.afterExpand, this),
                            this.expandDefaults));
            }else{
                this[this.collapseEl].show(this.hideMode);
                this.afterExpand(false);
            }
        },

    Thanks!!

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    Just try to configure your panel with slideAnchor:'b'.

  3. #3
    Sencha User
    Join Date
    Jul 2009
    Posts
    56
    Vote Rating
    0
    omermx is on a distinguished road

      0  

    Default


    hi, tried using slideAnchor = b, but it only seems to change the direction of the animation rather than the position of the expanded panel.

    Here's the code I'm using to determine constraint offsets, but doesn't really have the desired effect...

    Code:
        getConstrainOffsets : function(eventEl) {
       
       
                var offsets = {
                        right:this.el.shadowOffset,
                        left:this.el.shadowOffset,
                        bottom:this.el.shadowOffset
                    };
    				
                
    			
       var xy = this.el.getConstrainToXY(Ext.getCmp('schedulePanel').container, true, offsets);
                	
    			
    			if(xy){
                                    this.slideAnchor = 't';
    				return [xy[0],xy[1]];
                }
    			else
    			{
    			  this.slideAnchor = 'b';
    			}
         
    		
    		
            
        },
    The image attached might explain it better - as you can see the form panel is expanded but is only half visible as it is out of the browser window.

    Any thoughts?
    Attached Images

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    You need to use getAlignToXY instead of getConstrainToXY.

  5. #5
    Sencha User
    Join Date
    Jul 2009
    Posts
    56
    Vote Rating
    0
    omermx is on a distinguished road

      0  

    Default


    Hi have scoured the API, where can I find details of this function??

  6. #6
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    Try:
    Code:
    var xy = el.getAlignToXY(otherEl, 'tl-bl?', [0,0]);

  7. #7
    Sencha User
    Join Date
    Jul 2009
    Posts
    56
    Vote Rating
    0
    omermx is on a distinguished road

      0  

    Default


    that doesn't work at all, the panel appears way off.

Similar Threads

  1. Slide toolbar using panel
    By blessan in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 30 Jun 2010, 4:25 AM
  2. [OPEN-918] dblclick tool icon in window Panel expands
    By mikegiddens in forum Ext 3.x: Bugs
    Replies: 5
    Last Post: 29 Apr 2010, 7:21 AM
  3. Slide panel with BorderLayout
    By fdm in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 23 Dec 2009, 6:09 AM
  4. Animate Toolbar Prob - Slide out one slide in another
    By coolbeans in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 19 Aug 2009, 9:39 AM

Thread Participants: 1

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