From 078fba85c3be71bfcfdaacb1d02b06b6845c7e5d Mon Sep 17 00:00:00 2001 From: Justin Huang Date: Thu, 20 Jul 2017 17:27:48 -0700 Subject: [PATCH] Fixed background not being set from config on load. --- ros-rviz-display.html | 10 ++++++---- ros-rviz-options.html | 16 +++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ros-rviz-display.html b/ros-rviz-display.html index 8e266f8..ef3b869 100644 --- a/ros-rviz-display.html +++ b/ros-rviz-display.html @@ -207,10 +207,12 @@

{{name}}

// 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) { diff --git a/ros-rviz-options.html b/ros-rviz-options.html index 23064e1..c80b948 100644 --- a/ros-rviz-options.html +++ b/ros-rviz-options.html @@ -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); }, });