refactor redraw into pubsub and autoredraw
- pubsub is a basic pubsub impl - autoredraw is glue code to register callback to pubsub and onevent moved e.redraw to autoredraw
This commit is contained in:
parent
db46bb4414
commit
0005cf26ee
13 changed files with 149 additions and 105 deletions
|
|
@ -1,12 +0,0 @@
|
|||
"use strict"
|
||||
|
||||
module.exports = function(renderers) {
|
||||
return function() {
|
||||
if (renderers.length === 0) return
|
||||
if (renderers.length === 1) return renderers[0]()
|
||||
|
||||
for (var i = 0; i < renderers.length; i++) {
|
||||
renderers[i]()
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue