Eng/vis multi outputs (#131)

* added dynamic setting options based on graph outputs

* added functionality to view different types of outputs

* fixed first value set to nothing

* moved try except in smaller scope

* thinking I fixed the weird every so often python stops because of exception error

* fixed many dropdown issue; fixed default value issue
This commit is contained in:
evonneng authored and GitHub committed 2022-07-13 14:36:11 -07:00
1 parent ff4f1bb421
commit 069cf2c40f
4 files changed
+115 -66

No files matched your search

+12 -8
View File
@@ -43,6 +43,7 @@ export class Viewer extends Component {
viewport_width: null,
viewport_height: null,
};
this.created_controls = false;
this.update = this.update.bind(this);
this.set_object = this.set_object.bind(this);
this.handle_command = this.handle_command.bind(this);
@@ -178,15 +179,18 @@ export class Viewer extends Component {
}
set_output_options(object) {
let output_options_control = new function () {
this.output_options = 'default';
}
// add controls
this.state.gui.add(output_options_control, 'output_options', object).listen().onChange(
(value) => {
this.send_output_type_over_websocket(value);
if (this.created_controls === false) {
let output_options_control = new function () {
this.output_options = 'default';
}
)
// add controls
this.state.gui.add(output_options_control, 'output_options', object).listen().onChange(
(value) => {
this.send_output_type_over_websocket(value);
}
)
}
this.created_controls = true
}
handle_command(cmd) {