Skip to content

Add option to set_control_value without invoking the callback - #98

Merged
rdeits merged 1 commit into
meshcat-dev:masterfrom
RussTedrake:invoke_callback
Aug 31, 2021
Merged

rdeits merged 1 commit into
meshcat-dev:masterfrom
RussTedrake:invoke_callback

Conversation

@RussTedrake

Copy link
Copy Markdown
Collaborator

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

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
RussTedrake requested a review from rdeits August 30, 2021 11:54
RussTedrake added a commit to RussTedrake/drake that referenced this pull request Aug 30, 2021
RussTedrake added a commit to RussTedrake/drake that referenced this pull request Aug 30, 2021
Comment thread src/index.js
}

set_control_value(name, value) {
set_control_value(name, value, invoke_callback=true) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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...

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

Successfully merging this pull request may close these issues.

2 participants