Enlarge then reduce a picture with double tap

Hey everyone,

I feel a bit stupid asking this since it seems very simple to do but i cannot find the right way to do it.

I just want to enlarge a picture when i double tap on it, then reduce it to the original size when i double tap on it again.

Thank you in advance for your replies !

Hi @Foley,

There is no stupid question :wink:

The easy way to do this is to add a simple text in your experience (you can hide it or put an opacity at zero so it’s not visible). By default this text would say "Normal.

Then, you need to have two conditionnel triggers and actions sets:

The first one would be:

When the image is double tapped and if the text of the text is “Normal” then maximize the picture and set the text to “Maximized”

The second one would be:
When the image is double tapped if the text is set to “Maximized”, then set to picture so normal and the text to “Normal”

The result would be something like this :

Hope this helps!

More about conditionnal triggers here: http://support.intuilab.com/kb/triggers-and-actions/linking-triggers-and-actions-in-composer#conditional-triggers

Would this solution enlarge annotations as well or just the original image?

Yes it would enlarge annotations as well but keep the ratio with the image.

Forget what I said above, there is a simple action that allows to do this in a much more simple manner. Just use the “toggle maximize” action.

ok thanx for the replies, so yeah it is actually a bit complicated to do, i thought that when we add a second trigger, it “cancel” the first one.

Like if the first trigger was “when image 1 is tapped then resize factor to 10”, then second trigger is “when image 1 is tapped then resize factor to 1” then it would work …

So what’s the difference between adding 2 actions with one trigger, or adding a second trigger with a second action ?
It looks the same to me now …

ok thanx for the replies, so yeah it is actually a bit complicated to do, i thought that when we add a second trigger, it “cancel” the first one.

It actually does if you use the “Toggle maximize” action.

So what’s the difference between adding 2 actions with one trigger, or adding a second trigger with a second action ?

The easiest way to do this is to use the toggle maximize, don’t bother with the two actions. I had initially posted this because I had forgotten that this “Toggle Maximize” action existed.

lol ok chloe merci