1. #1
    Sencha User jep's Avatar
    Join Date
    Sep 2010
    Posts
    862
    Vote Rating
    21
    jep will become famous soon enough jep will become famous soon enough

      0  

    Default trying to catch resize event on a panel

    trying to catch resize event on a panel


    I'm just trying to get a simple resize event handler working, but I've had no luck. Here's my code:

    Code:
     <!DOCTYPE html>
     <html>
    
     <head>
        <meta charset="utf-8">
        <title id="title">test</title>
        
        <link rel="stylesheet" href="../resources/css/ext-touch.css" type="text/css">
        
        <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
    
        <script type="text/javascript" src="../ext-touch-debug.js"></script>
    
        <script type="text/javascript">
          Ext.setup({
            onReady: function() {
              
              var map = new Ext.Map({
                listeners:{
                  resize:function() {
                    console.log('resize');              
                  }
                } 
              });
    
              var mainPanel = new Ext.Panel({
                fullscreen: true,
                items:[map]
              });
            }
          });
        </script>
    
     </head>
    
     <body></body>
    
     </html>
    But I never see any messages logged. I do if I just throw a "console.log('here')" somewhere in onReady. So it's not my debugger. Am I doing something wrong? The api was a bit sparse on examples for listeners, so I had to cobble this together from random examples.

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,802
    Vote Rating
    605
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    The main panel has no layout, so it's never going to size the child items. You want the fit layout.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha User jep's Avatar
    Join Date
    Sep 2010
    Posts
    862
    Vote Rating
    21
    jep will become famous soon enough jep will become famous soon enough

      0  

    Default


    Thanks for the reply! Do you mean like this?

    Code:
     <!DOCTYPE html>
     <html>
    
     <head>
        <meta charset="utf-8">
        <title id="title">test</title>
        
        <link rel="stylesheet" href="../resources/css/ext-touch.css" type="text/css">
        
        <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
    
        <script type="text/javascript" src="../ext-touch-debug.js"></script>
    
        <script type="text/javascript">
          Ext.setup({
            onReady: function() {
              
              var map = new Ext.Map({
                listeners:{
                  resize:function() {
                    console.log('resize');              
                  }
                } 
              });
    
              var mainPanel = new Ext.Panel({
                fullscreen: true,
                layout:'fit',
                items:[map],
                listeners:{
                  resize:function() {
                    console.log('resize');              
                  }
                } 
              });
            }
          });
        </script>
    
     </head>
    
     <body></body>
    
     </html>
    I still don't get any resize log messages when I do it this way.

  4. #4
    Sencha User jep's Avatar
    Join Date
    Sep 2010
    Posts
    862
    Vote Rating
    21
    jep will become famous soon enough jep will become famous soon enough

      0  

    Default


    Bump. No response, evant? I still don't see panel resize events when I think I should (1.1). Others have reported this as well.

Similar Threads

  1. Panel Resize Event Question
    By parky128 in forum Ext 3.x: Help & Discussion
    Replies: 9
    Last Post: 1 Apr 2010, 2:54 AM
  2. How to catch Browser Resize event
    By prakash.raman in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 8 May 2009, 6:06 AM
  3. How to get resize event for Ext.Panel?
    By mickh in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 12 Nov 2008, 2:12 AM
  4. [Panel resize event] Is not raised?
    By dplus in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 16 Mar 2008, 12:14 PM
  5. how can I catch enddrag event on a panel
    By nomi_5 in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 8 Jan 2007, 2:07 AM

Thread Participants: 1

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