setTimeout of 16 instead of 0
This commit is contained in:
parent
5db2dc8434
commit
86a79a0f5e
1 changed files with 2 additions and 2 deletions
|
|
@ -465,11 +465,11 @@ Mithril = m = new function app(window, undefined) {
|
|||
var defer = window.requestAnimationFrame || window.setTimeout
|
||||
if (lastRedrawId && force !== true) {
|
||||
cancel(lastRedrawId)
|
||||
lastRedrawId = defer(redraw, 0)
|
||||
lastRedrawId = defer(redraw, 16) //60 frames per second = 1 call per 16 ms
|
||||
}
|
||||
else {
|
||||
redraw()
|
||||
lastRedrawId = defer(function() {lastRedrawId = null}, 0)
|
||||
lastRedrawId = defer(function() {lastRedrawId = null}, 16)
|
||||
}
|
||||
}
|
||||
m.redraw.strategy = m.prop()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue