Skip to main content
Question

Selecting and deselecting element with variables

  • October 22, 2024
  • 0 replies
  • 158 views

petar.brkovic

I have an element that needs to have select/unselect capability. I have created a variable called elementSelected. It’s initially set to false, and the element is unselected.

This is what I’ve done in the prototype settings:

The first time i click on element, the “elementSelected” variable switches to true, and my element changes its state to its selected state. However, once I click on the element again, nothing happens it doesn’t get unselected (its state doesn’t change).

Additionally, this is a mobile prototype, and the second click starts acting like I’m dragging instead of just clicking.

What am I doing wrong? Thanks in advance!

This topic has been closed for replies.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings