Replace unnecessary bind(this) and var self = this statements with arrow functions in remaining src/ files

This commit is contained in:
Jonas Jenwald 2017-05-03 16:39:54 +02:00
parent e42fc546a0
commit 6c81b8e6dd
7 changed files with 86 additions and 103 deletions

View file

@ -537,10 +537,9 @@ var renderTextLayer = (function renderTextLayerClosure() {
if (!timeout) { // Render right away
render(this);
} else { // Schedule
var self = this;
this._renderTimer = setTimeout(function() {
render(self);
self._renderTimer = null;
this._renderTimer = setTimeout(() => {
render(this);
this._renderTimer = null;
}, timeout);
}
},