1. #1
    Sencha Touch Premium User
    Join Date
    Oct 2010
    Location
    Portland, Maine USA
    Posts
    66
    Vote Rating
    1
    gordonjl is on a distinguished road

      0  

    Default Ext.Map -- Not Changing Orientation When Hidden-Why?

    Ext.Map -- Not Changing Orientation When Hidden-Why?


    All,

    My Question: How can I force the Ext.Map to redraw itself when the orientation is changed and the Ext.Map is not visible?

    I have a sencha-touch app that consists of a viewport panel with a card layout that contains all of the panels of my application. One of the panels contains an Ext.Map component. The problem I have is that the map gets screwed up when the orientation of the phone is changed--it stays in profile mode when the orientation switches to landscape and vice versa. This problem goes away if I change the orientation while the Ext.Map is the active item of my viewport panel.

    Thanks!

  2. #2
    Sencha Touch Premium User
    Join Date
    Oct 2010
    Location
    Portland, Maine USA
    Posts
    66
    Vote Rating
    1
    gordonjl is on a distinguished road

      0  

    Default


    I've tried to workaround this by implementing the setProfile() method of the Ext.Map 's containing Panel, but it still isn't working. Here's my implementation:

    Code:
        setProfile: function(profile) {
    
            log.debug("map visible?  " + this.mapPanel.isVisible()); //<-- this.MapPanel is an Ext.Map instance
            if (! this.mapPanel.isVisible()) {
                log.debug("map not visible.  setting do layout call when shown");
                this.on('show', this.mapPanel.doComponentLayout, this.mapPanel, {single:true});
            }
    
        },
    The funny thing is that the this.mapPanel.isVisible() always returns true regardless of whether it is or isn't visible. That aside, if I always set the function call to execute regardless of the isVisible() call, it _still_ doesn't redraw the Ext.Map. The only thing that causes the Ext.Map to redraw is when the phone's orientation is changed _while_ the map is visible.

    Odd, indeed.

  3. #3
    Sencha User
    Join Date
    May 2011
    Posts
    9
    Vote Rating
    0
    CaseyK24 is on a distinguished road

      0  

    Default


    What I do is on the activate listener to the map panel I call:
    google.maps.event.trigger(Map.map, 'resize');

    The resize will handle any potential orientation changes that happened while you were not on the map display.

    Casey

Similar Threads

  1. changing scroll direction on orientation change
    By Frances in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 16 Feb 2011, 2:59 PM
  2. Replies: 2
    Last Post: 20 Dec 2010, 4:23 AM
  3. Replies: 3
    Last Post: 9 Jan 2010, 7:33 AM
  4. How To Make Hidden Columns Permanently Hidden ??
    By chalu in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 11 Sep 2008, 12:57 PM
  5. Changing the hidden property of the panel cause width problem
    By emredagli in forum Ext 2.x: Help & Discussion
    Replies: 10
    Last Post: 13 Jul 2008, 9:17 AM

Thread Participants: 1

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