+1
Z odpowiedzią

Is there any way possible to have the panel swipe with the finger when calling onswipeleft?

cavossman 11 lat temu Ostatnio zmodyfikowane przez icahill (Administrator) 11 lat temu 5
I was hoping to be able to move the panel like the movement of the finger swiping to give the panel an appearance of movement.
Try adding draggable="yes" to your panel. You can also add dragorientation="vertical" or horizontal to lock in to a position.

Or for a more defined movement, you can use the translate action when the onswipeleft is invoked and move the panel to a specific pixel value on the screen.
It still doesn't move at all, it just goes directly to the action and the next page that I designed it to go to.
Ah so you have an onclickup associated to your panel? Then you would want to add a translate action to that.

You might also consider looking at the object properties for RWtouched. This way you can assign the translate to move exactly where you finger is.


<!--SAMPLE WIRE for using _RW-touchedx and _RW-touchedy-->
<wire>
<main>
<panel name="1" width="100%" height="100%" background="ff0000" onclickup="show"></panel>
</main>
<actions>
<action name="show">
<alert message="_RW-touchedx, _RW-touchedy"/>
</action>
</actions>
</wire>
Okay, I've gotten a start to it finally. I just have one last question about this... Since the panel is the full width of the screen, it doesn't move horizontally because it won't extend past the limits of the screen, is there any way to make it move beyond the screen?
The only way you can move outside of the bounds of the screen is to use a translate action and translate to a negative or positive percentage.

ex.


<translate xpos="-100%" time="2" curve="linear" target="PANEL" />