Fix bug where color scale can break if new runs load over the lifetime of tensorboard.
Change: 122541517
This commit is contained in:
parent
050aab10d3
commit
43ff0e9172
@ -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);
|
||||
},
|
||||
});
|
||||
})();
|
||||
|
Loading…
Reference in New Issue
Block a user