Help with the Toggle Move interaction.

Alex shared this problem 5 years ago
Solved

I am trying to set a toggle event with a move interaction. I'd like the move interaction to simply move some objects down about 50 pixels, and I would think with the toggle event it would just reverse the move upon second click but that's where I am running into a problem.


The second click isn't doing anything and a third click will again move the objects down another 50 pixels.


I'm sure the solution is simple but it is eluding me!

Comments (4)

photo
1

Any update on this problem? Ran into the same thing. I want to toggle a menu that slides the whole content area to the right with the toggle event and the move by offset action. First interaction works well, on the second click: nothing, on the third click the content moves to the right again and not back to the original position.


Any help?

photo
1

Hi Jeremias,


can you send your prototype to jim.support@justindmind.com?


We will try to get a solution for your problem.


Best regards.

photo
1

Thanks for your mail-reply and the hint. I haven't worked with the variables before. But it did the trick. Thank you so much.


What I did:


- set up a variable "menu" and set it to 0


- on tap event check if variable is 0


- if so move content to desired position and set variable to 1


- if not move content back to original position and set variable to 0


Nice workaround. Anyway, isn't the toggle event meant to reverse the first interaction on the second click?


Cheers

photo
1

It seems a bug. I just worked with your prototype again and I recommend you to change the "toggle" event for a "on click" event and work with the variable. It works fine.