0
En revisión
Displaying Large Graphics with Zoom
I'm trying to build an app that allows users to select from a menu of large images for them to view and zoom. So far I've been able to create this functionality for the android version by having menu clicks swap in new sources for the main image. It works as long as the images are taller than they are wide.
For the iOS version though I've been having much more difficulty. With the image source swapping method the original image looks fine but every image after that that is swapped in is displayed with distorted dimensions (squished vertically), including the original image its source is swapped back in.
I've tried displaying the large images in a panel and then having menu clicks hide/reveal different panels but nothing I've tried in this area has worked. If the panel appears lower in the wire its graphic will display and zoom fine, but if it's behind any of the other panels in the wire containing large images then it will show up but it can't be zoomed. I've tried hiding the offending panels by setting their alphas to zero, I've tried moving the panels far off screen, and I've tried unloading the images and also unloading the containing panels. No matter what, if a panel A has a panel appearing after it in the wire code then I won't be able to zoom the large image in panel A.
Any ideas? Either with how to solve the panel over panel zooming issue or with how to solve the image source swapping distorted dimensions issue?
David
For the iOS version though I've been having much more difficulty. With the image source swapping method the original image looks fine but every image after that that is swapped in is displayed with distorted dimensions (squished vertically), including the original image its source is swapped back in.
I've tried displaying the large images in a panel and then having menu clicks hide/reveal different panels but nothing I've tried in this area has worked. If the panel appears lower in the wire its graphic will display and zoom fine, but if it's behind any of the other panels in the wire containing large images then it will show up but it can't be zoomed. I've tried hiding the offending panels by setting their alphas to zero, I've tried moving the panels far off screen, and I've tried unloading the images and also unloading the containing panels. No matter what, if a panel A has a panel appearing after it in the wire code then I won't be able to zoom the large image in panel A.
Any ideas? Either with how to solve the panel over panel zooming issue or with how to solve the image source swapping distorted dimensions issue?
David
Servicio de atención al cliente por UserEcho
Could you post a small sample wire so I can get an idea of what you are seeing?
Thanks.
<wire name="testAlphaToggle">
<main>
<!-- Background -->
<panel name="bg" width="100%" height="100%" background="#a0c4ee">
</panel>
<!-- Maps display here -->
<panel name="map02" alias="MAP02" width="100%" height="1136" lheight="100%" zoomable="yes" draggable="yes" zoommin="1" zoommax="60" alpha="0">
<image name="map02IMG" alias="MAP02IMG" source="map02.gif" width="100%" ypos="40" lypos="0" lwidth="480"></image>
</panel>
<panel name="map01" alias="MAP01" width="100%" height="1136" lheight="100%" zoomable="yes" draggable="yes" zoommin="1" zoommax="60" alpha="1">
<image name="map01IMG" alias="MAP01IMG" source="map01.gif" width="100%" ypos="40" lypos="0" lwidth="480"></image>
</panel>
<!-- Header -->
<panel name="header" alias="HEADER" width="100%" height="40" background="#1d54e5" ypos="0" lypos="-5000">
<image name="showMap01" alias="SHOWMAP01" source="menu.icon.04.png" valign="top" xpos="0" lxpos="-5000" width="40" height="40" alpha="0" onclick="showMap01"></image>
<image name="showMap02" alias="SHOWMAP02" source="menu.icon.04.png" valign="top" xpos="0" lxpos="-5000" width="40" height="40" alpha="1" onclick="showMap02"></image>
</panel>
</main>
<actions>
<action name="showMap01">
<alpha value="0" target="MAP02" />
<alpha value="1" target="MAP01" />
<alpha value="0" target="SHOWMAP01" />
<alpha value="1" target="SHOWMAP02" />
</action>
<action name="showMap02">
<alpha value="0" target="MAP01" />
<alpha value="1" target="MAP02" />
<alpha value="0" target="SHOWMAP02" />
<alpha value="1" target="SHOWMAP01" />
</action>
</actions>
</wire>
<wire name="testTranslateToggle">
<main>
<!-- Background -->
<panel name="bg" width="100%" height="100%" background="#a0c4ee">
</panel>
<!-- Maps display here -->
<panel name="map02" alias="MAP02" width="100%" height="1136" lheight="100%" zoomable="yes" draggable="yes" zoommin="1" zoommax="60" alpha="1">
<image name="map02IMG" alias="MAP02IMG" source="A2.00.05.Z3.02.gif" width="100%" ypos="40" lypos="0" lwidth="480"></image>
</panel>
<panel name="map01" alias="MAP01" width="100%" height="1136" lheight="100%" zoomable="yes" draggable="yes" zoommin="1" zoommax="60" alpha="1">
<image name="map01IMG" alias="MAP01IMG" source="00.00.Choose.Area.Z3.01.gif" width="100%" ypos="40" lypos="0" lwidth="480"></image>
</panel>
<!-- Header -->
<panel name="header" alias="HEADER" width="100%" height="40" background="#1d54e5" ypos="0" lypos="-5000">
<image name="showMap01" alias="SHOWMAP01" source="menu.icon.04.png" valign="top" xpos="0" lxpos="-5000" width="40" height="40" alpha="0" onclick="showMap01"></image>
<image name="showMap02" alias="SHOWMAP02" source="menu.icon.04.png" valign="top" xpos="0" lxpos="-5000" width="40" height="40" alpha="1" onclick="showMap02"></image>
</panel>
</main>
<actions>
<action name="showMap01">
<translate xpos="0" time="0" target="MAP01"/>
<alpha value="0" target="SHOWMAP01" />
<alpha value="1" target="SHOWMAP02" />
</action>
<action name="showMap02">
<translate xpos="-5000" time="0" target="MAP01"/>
<alpha value="1" target="SHOWMAP01" />
<alpha value="0" target="SHOWMAP02" />
</action>
</actions>
</wire>
RareWire seems so amazing. I'm really hoping to find a solution.
<wire name="testToggleSource">
<main>
<!-- Background -->
<panel name="bg" width="100%" height="100%" background="#a0c4ee">
</panel>
<!-- Maps display here -->
<panel name="map01" alias="MAP01" width="100%" height="1136" lheight="100%" zoomable="yes" draggable="yes" zoommin="1" zoommax="60" alpha="1">
<image name="map01IMG" alias="MAP01IMG" source="map01.gif" width="100%" ypos="40" lypos="0" lwidth="480"></image>
</panel>
<!-- Header -->
<panel name="header" alias="HEADER" width="100%" height="40" background="#1d54e5" ypos="0" lypos="-5000">
<image name="showMap01" alias="SHOWMAP01" source="menu.icon.04.png" valign="top" xpos="0" lxpos="-5000" width="40" height="40" alpha="0" onclick="showMap01"></image>
<image name="showMap02" alias="SHOWMAP02" source="menu.icon.04.png" valign="top" xpos="0" lxpos="-5000" width="40" height="40" alpha="1" onclick="showMap02"></image>
</panel>
</main>
<actions>
<action name="showMap01">
<assign property="object:MAP01IMG.source" value="map02.gif" />
<alpha value="0" target="SHOWMAP01" />
<alpha value="1" target="SHOWMAP02" />
</action>
<action name="showMap02">
<assign property="object:MAP01IMG.source" value="map01.gif" />
<alpha value="1" target="SHOWMAP01" />
<alpha value="0" target="SHOWMAP02" />
</action>
</actions>
</wire>