This should be this.update() instead of this.render() to take advantage of the raf management yeah?
|
_onload () { |
|
this.loaded = true |
|
this.onload() |
|
// if any listeners were attached in onload we trigger a rerender as state |
|
// may have changed between createElement or unload/load |
|
if (this[unloaders].length) this.render() |
|
} |
We should shadow bind this._reallyUpdate in the constructor since update could be called at a high frequency (e.g. some kind of animation loop that uses this.update() to render new frames.)
|
update () { |
|
if (this[updating]) return |
|
this[updating] = true |
|
window.requestAnimationFrame(this._reallyUpdate.bind(this)) |
|
} |
Thoughts?
This should be
this.update()instead ofthis.render()to take advantage of the raf management yeah?hui/index.js
Lines 82 to 88 in 568c274
We should shadow bind
this._reallyUpdatein the constructor since update could be called at a high frequency (e.g. some kind of animation loop that usesthis.update()to render new frames.)hui/index.js
Lines 53 to 57 in 568c274
Thoughts?