Comment #1 on issue 307 by msgilli...@gmail.com: Event beforetransition
fires before page has layout
http://code.google.com/p/iui/issues/detail?id=307
You know this one is really relevant to iUI 0.40. We're trying to create
an API (or, actually, event model) for iUI extensions. I experimented with
a bunch of them myself and have refined the events somewhat.
It looks like I may have missed something.
Can you provide an example and tell me how to reproduce this one?
A use case:
Create an iui html page with two internal screens. Page1 is selected and
has a link to page2. Page2 has a google map with 100% width/height.
Add a listener on page2:
function onDeviceReady () {
var map = // new google map
document.getElementById ('Page2')
.addEventListener("beforetransition",
function(){google.maps.event.trigger(tour.map, 'resize');},
false);
};
window.addEventListener('load', onDeviceReady, false);
Now run the page and click on the link from page1 to page2. The map
normally does not resize. While on page2 flip the phone from portrait to
landscape. Now notice the map resizes, since it has the dimensions of the
parent.
Now move the code that fires beforetransition a couple of lines below,
after toPage.setAttribute("selected", "true"). It should work flawlessly
there.
This happens with the function slide2(). I am not sure whether this issue
exists with slide1()
Comment #3 on issue 307 by msgilli...@gmail.com: Event beforetransition
fires before page has layout
http://code.google.com/p/iui/issues/detail?id=307
(No comment was entered for this change.)