Skip to content

Commit

Permalink
Fix TensorBoard in Safari by not using ES6 constructs in our polymer …
Browse files Browse the repository at this point in the history
…components.

Change: 123887298
  • Loading branch information
teamdandelion authored and tensorflower-gardener committed Jun 2, 2016
1 parent 9b92caf commit 5334468
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -194,7 +194,8 @@
// e.g. if TensorBoard was opened into a new tab that isn't visible.
// As a workaround... we know requestAnimationFrame won't fire until the
// page has focus, so updateStyles again on requestAnimationFrame.
window.requestAnimationFrame(() => this.updateStyles());
var _this = this;
window.requestAnimationFrame(function() {_this.updateStyles();});
},
_checkboxChange: function(e) {
var name = e.srcElement.name;
Expand All @@ -210,14 +211,13 @@
this.outSelected = change.base.slice();
},
toggleAll: function() {
var _this = this;
var allOn = this.namesMatchingRegex
.filter((n) => !this.runToIsCheckedMapping[n])
.filter(function(n) {return !_this.runToIsCheckedMapping[n]})
.length === 0;

this.namesMatchingRegex.forEach((n) => this.runToIsCheckedMapping[n] = !allOn);
this.namesMatchingRegex.forEach(function(n) {_this.runToIsCheckedMapping[n] = !allOn});
this.runToIsCheckedMapping = _.clone(this.runToIsCheckedMapping);
},
});
</script>

</dom-module>

0 comments on commit 5334468

Please sign in to comment.