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
|
|
@ -3,7 +3,7 @@
|
|||
var createRenderer = require("../render/render")
|
||||
var throttle = require("../api/throttle")
|
||||
|
||||
module.exports = function($window, redraw) {
|
||||
module.exports = function($window, renderers) {
|
||||
var renderer = createRenderer($window)
|
||||
return function(root, component) {
|
||||
var run = throttle(function() {
|
||||
|
|
@ -12,7 +12,7 @@ module.exports = function($window, redraw) {
|
|||
|
||||
renderer.setEventCallback(run)
|
||||
|
||||
redraw.run = run
|
||||
renderers.push(run)
|
||||
run()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue