Fix bug where color scale can break if new runs load over the lifetime of tensorboard.

Change: 122541517
This commit is contained in:
Dan Mané 2016-05-17 09:56:10 -08:00 committed by TensorFlower Gardener
parent 050aab10d3
commit 43ff0e9172

View File

@ -13,15 +13,21 @@ a set of colors.
Polymer({
is: "tf-color-scale",
properties: {
runs: Array,
runs: {
type: Array,
},
outColorScale: {
type: Object,
computed: "makeColorScale(runs.*)",
readOnly: true,
notify: true,
value: function() {
return new TF.ColorScale();
},
},
},
makeColorScale: function(runs) {
return new TF.ColorScale().domain(this.runs);
observers: ['updateColorScale(runs.*)'],
updateColorScale: function(runsChange) {
this.outColorScale.domain(this.runs);
},
});
})();