improve loop
This commit is contained in:
parent
09b25cb803
commit
3073b27abd
1 changed files with 2 additions and 2 deletions
|
|
@ -521,10 +521,10 @@ var m = (function app(window, undefined) {
|
||||||
};
|
};
|
||||||
m.redraw.strategy = m.prop();
|
m.redraw.strategy = m.prop();
|
||||||
function redraw() {
|
function redraw() {
|
||||||
var mode = m.redraw.strategy();
|
var forceRedraw = m.redraw.strategy() === "all";
|
||||||
for (var i = 0, root; root = roots[i]; i++) {
|
for (var i = 0, root; root = roots[i]; i++) {
|
||||||
if (controllers[i]) {
|
if (controllers[i]) {
|
||||||
m.render(root, modules[i].view(controllers[i]), mode === "all")
|
m.render(root, modules[i].view(controllers[i]), forceRedraw)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//after rendering within a routed context, we need to scroll back to the top, and fetch the document title for history.pushState
|
//after rendering within a routed context, we need to scroll back to the top, and fetch the document title for history.pushState
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue