Skip to content

Commit

Permalink
Fixed background not being set from config on load.
Browse files Browse the repository at this point in the history
  • Loading branch information
jstnhuang committed Jul 21, 2017
1 parent b9ce6b7 commit 078fba8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
10 changes: 6 additions & 4 deletions ros-rviz-display.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,12 @@ <h1 hidden$="[[!permanent]]">{{name}}</h1>

// Currently only used by global options display.
loadConfig: function(config) {
var display = this.$$('#display');
if (display && display.loadConfig) {
display.loadConfig(config);
}
Polymer.RenderStatus.afterNextRender(this, function() {
var display = this.$$('#display');
if (display && display.loadConfig) {
display.loadConfig(config);
}
});
},

_handleCheckbox: function(evt) {
Expand Down
16 changes: 7 additions & 9 deletions ros-rviz-options.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,13 @@

_updateGlobalOptions: function() {
var that = this;
this.debounce('updateGlobalOptions', function() {
that.set('globalOptions.background', that.background);
that.set('globalOptions.clientId', that.clientId);
that.set('globalOptions.colladaLoader', that.colladaLoader);
that.set('globalOptions.colladaServer', that.colladaServer);
that.set('globalOptions.fixedFrame', that.fixedFrame);
that.set('globalOptions.url', that.url);
that.set('globalOptions.videoServer', that.videoServer);
}, 500);
that.set('globalOptions.background', that.background);
that.set('globalOptions.clientId', that.clientId);
that.set('globalOptions.colladaLoader', that.colladaLoader);
that.set('globalOptions.colladaServer', that.colladaServer);
that.set('globalOptions.fixedFrame', that.fixedFrame);
that.set('globalOptions.url', that.url);
that.set('globalOptions.videoServer', that.videoServer);
},
});
</script>
Expand Down

0 comments on commit 078fba8

Please sign in to comment.