Add m.redraw() support for multiple mount points
To better match `0.2.x` behavior: https://jsfiddle.net/xbpyqL9k/
This commit is contained in:
parent
058b25002d
commit
71c77ba603
8 changed files with 97 additions and 30 deletions
12
api/redraw.js
Normal file
12
api/redraw.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
"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