+1
Not a bug

I think I've found a bug where percentage-positioned elements don't recalculate when the device is turned 90°.

thillsman 12 років тому оновлений 12 років тому 3
I'm working on a app that will display multiple panels in a table structure (pager with 3 items per row, infinite rows). Each row has a panel at xposes (plural of "xpos"?) of 0%, 33%, and 67%. Everything works fine and dandy until I turn my device. When I do, the left panel stays left, the right panel stays right, but the center panel leans to the left (the same distance away from the left panel as before). If I "refresh" the table (delete it and recreate it from my nav panel), it looks like it should. (In this description, I start in portrait and turn to landscape. If I start in landscape and turn to portrait, the center panel leans to the right.)

I've built table structures like this before and it's always worked, however this time I'm using object tags and multiple classes. I'm betting that has something to do with it. Here's the relevant portion of my code if you'd like to take a look:



<class name="marketing">
<panel name="panelmarketing" alias="MARKETING" style="mainpanelstyle" background="efefef">
<image name="linen" source="images/linen.jpg" width="100%" height="100%" contain="no"></image>
<pager name="pagermarketing" orientation="vertical" paginate="no" width="100%" height="100%">
<panel name="spacer" width="100%" height="30" ></panel>
<panel name="row1" width="100%" height="200">
<object class="marketingcol1" imagesource="images/pdf1.png" textvalue="text" />
<object class="marketingcol2" imagesource="images/pdf2.png" textvalue="text" />
<object class="marketingcol3" imagesource="images/pdf3.png" textvalue="text" />
</panel>
<panel name="row2" width="100%" height="200">
<object class="marketingcol1" imagesource="images/pdf1.png" textvalue="text" />
<object class="marketingcol2" imagesource="images/pdf2.png" textvalue="text" />
<object class="marketingcol3" imagesource="images/pdf3.png" textvalue="text" />
</panel>
<panel name="row3" width="100%" height="200">
<object class="marketingcol1" imagesource="images/pdf1.png" textvalue="text" />
<object class="marketingcol2" imagesource="images/pdf2.png" textvalue="text" />
<object class="marketingcol3" imagesource="images/pdf3.png" textvalue="text" />
</panel>
<panel name="row4" width="100%" height="200">
<object class="marketingcol1" imagesource="images/pdf1.png" textvalue="text" />
<object class="marketingcol2" imagesource="images/pdf2.png" textvalue="text" />
<object class="marketingcol3" imagesource="images/pdf3.png" textvalue="text" />
</panel>
</pager>
</panel>
</class>
<class name="marketingcol1">
<panel name="col1" width="33%" height="75%" valign="center">
<image name="image" source="[param:imagesource]" style="marketingimage"></image>
<text name="text" text="[param:textvalue]" style="marketingtext"></text>
</panel>
</class>
<class name="marketingcol2">
<panel name="col1" width="34%" height="75%" xpos="33%" valign="center">
<image name="image" source="[param:imagesource]" style="marketingimage"></image>
<text name="text" text="[param:textvalue]" style="marketingtext"></text>
</panel>
</class>
<class name="marketingcol3">
<panel name="col1" width="33%" height="75%" xpos="67%" valign="center">
<image name="image" source="[param:imagesource]" style="marketingimage"></image>
<text name="text" text="[param:textvalue]" style="marketingtext"></text>
</panel>
</class>

Nevermind. User error. When copying and pasting, I didn't realize I was putting three panels named "col1" next to each other. The code handled it remarkably well, though.

Disregard.
Yep, that would contribute to an error like that. WIRE doesn't like siblings with the same names.

Well done on the self-correction :)
Ha! It just took rereading the code to realize it. Sorry to clog up the community with "doh!" issues.