+1
Z odpowiedzią
onclickup across whole screen
Is it possible to attach an onclickup to the whole window that is only fired when no other action is executed?
The intent is to create an issue skin app, most magazines in the app store have a toolbar interface which toggles open and closed when the user clicks on an area of the screen that is not already bound to a clickup action.
Can you help me simulate this?
The intent is to create an issue skin app, most magazines in the app store have a toolbar interface which toggles open and closed when the user clicks on an area of the screen that is not already bound to a clickup action.
Can you help me simulate this?
Customer support service by UserEcho
<wire>
<main>
<panel name="background" alias="BACKGROUND" width="100%" height="100%">
<pdf name="calendar" alias="CAL" source="output.pdf" height="100%" width="100%" spreads="cover" covertile="yes" tile="yes" orientation="horizontal" onclickup="show-toolbar">
<panel name="link" width="300" height="360" lwidth="200" lheight="250" valign="bottom" xpos="140" lxpos="90" onpage="2" ></panel>
<panel name="link" width="130" height="100" lwidth="90" lheight="65" ypos="860" lypos="575" xpos="50" lxpos="30" onpage="1" ></panel>
</pdf>
<!-- TOOLBAR -->
<panel name="toolbar" alias="TOOLBAR" width="100%" height="65" ypos="-80" background="#ffffff" shadowradius="8" shadowopacity=".3">
<image name="logo" source="graphics/logo.png" height="55" align="left" valign="bottom" leftmargin="11%"></image>
<image name="about-town" source="graphics/txt_abouttown.png" align="right" valign="bottom" bottommargin="12%" onclickup="load-issue" rightmargin="20%" _wire="about.wire"></image>
</panel>
<include name="mag" alias="MAG" width="100%" height="100%" alpha="0"></include>
<panel name="wait" alias="WAIT" width="100%" height="100%" background="#000000" alpha="0">
<wait name="spinner" width="100%" height="100%"></wait>
</panel>
</main>
<actions>
<action name="show-toolbar">
<translate valign="top" time=".3" curve="linear" target="TOOLBAR" />
<set onclickup="hide-toolbar"/>
</action>
<action name="hide-toolbar">
<translate ypos="-80" time=".3" curve="linear" target="TOOLBAR" />
<set onclickup="show-toolbar"/>
</action>
<action name="load-issue">
<alpha value="1" time=".15" target="WAIT"/>
<sync>
<load target="MAG" file="_wire"/>
<alpha value="1" target="MAG"/>
<unload target="BACKGROUND"/>
<alpha value="0" target="BACKGROUND"/>
<alpha value="0" time=".15" target="WAIT"/>
</sync>
<translate ypos="-80" time=".3" curve="linear" target="TOOLBAR" />
</action>
<action name="close-issue">
<alpha value="1" time=".15" target="WAIT"/>
<unload />
<alpha value="0"/>
<load target="BACKGROUND"/>
<alpha value="1" target="BACKGROUND"/>
<alpha value="0" delay="1" time=".15" target="WAIT"/>
<set onclickup="show-toolbar" target="CAL"/>
</action>
</actions>
</wire>
Is there a way to prevent the objects on the pdf from firing the global click?
The only part left is that, if i create the pdf object and it's content is in a different wire file, then load it oninit, i cannot call my showToolbar function from the loaded wire, because it is in the parent document.
The app throws an error saying that the function is not found.
Do you know of a way to get around this?
I prefer to keep the app skin as a complete separate file than inside of each actual issue.
I will contact Kirk and Matthew to see what can be done unless you have a better suggestion.
<action name="close">
<play action="close-issue" superwire="yes" target="../.." />
</action>
If your main wire only houses the toolbar portion, then it shouldn't end up being an issue of overlapping objects since it would translate in and out on top of the include content. You may have to use the set action to move the toolbar tofront every time.
Is there no way to target the superwire from the subwire when calling an action?
In the example above your subwire would have an onclickup="close" on your PDF tag and that close action would play a show toolbar action inside your main.wire.