Repository navigation
Add option to set_control_value without invoking the callback - #98
Merged
Merged
Conversation
In a complicated workflow, like synchronizing sliders across multiple meshcat browsers, the ability to set the value without triggering the callback becomes quite useful. We simply shortcut the callback call in https://github.com/dataarts/dat.gui/blob/master/src/dat/controllers/Controller.js#L89
RussTedrake
added a commit
to RussTedrake/drake
that referenced
this pull request
Aug 30, 2021
Waiting for meshcat-dev/meshcat#98 to land.
RussTedrake
added a commit
to RussTedrake/drake
that referenced
this pull request
Aug 30, 2021
Waiting for meshcat-dev/meshcat#98 to land.
rdeits
approved these changes
Aug 31, 2021
| } | ||
|
|
||
| set_control_value(name, value) { | ||
| set_control_value(name, value, invoke_callback=true) { |
Collaborator
There was a problem hiding this comment.
Believe it or not, default values are a relatively recent (2015-ish) feature in javascript. I'm glad we don't have to do if (invoke_callback === undefined) anymore...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In a complicated workflow, like synchronizing sliders across multiple meshcat browsers, the ability to set the value without triggering the callback becomes quite useful.
We simply shortcut the callback call in https://github.com/dataarts/dat.gui/blob/master/src/dat/controllers/Controller.js#L89