Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger action when click graph without clicking object #202

Open
lynn0032 opened this issue Jun 27, 2024 · 0 comments
Open

Trigger action when click graph without clicking object #202

lynn0032 opened this issue Jun 27, 2024 · 0 comments

Comments

@lynn0032
Copy link

lynn0032 commented Jun 27, 2024

I've used a triggerSet/updateValue to make buttons appear when a point is clicked in the graph. I would like to make the buttons disappear when the user clicks anywhere else in the graph. A simple-ish solution could be to allow triggerWhenObjectsClicked="g", where "g" is the name of the graph itself.

Here is the minimal DoenetML for this:

<boolean name="hideButtons">true</boolean>

<graph name="g">
  <point name="p"/>
</graph>

<updateValue triggerWhenObjectsClicked="p" target="hideButtons" newValue="false" type="boolean"/> 

<!-- it would solve the issue if this worked -->
<updateValue triggerWhenObjectsClicked="g" target="hideButtons" newValue="true" type="boolean"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant