Skip to content

Commit

Permalink
修复android某些浏览器resize后不调整视图大小的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoda committed Jan 22, 2014
1 parent 2ca0099 commit 1bd3e49
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
8 changes: 7 additions & 1 deletion dist/spa.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@

;(function() {
var requestID,
resizeID,
winHeight,
winWidth

Expand Down Expand Up @@ -148,7 +149,12 @@
requestID = undefined
}
requestID = requestAnimationFrame(adjust)
})
})

$win.on('resize', function(event) {
clearTimeout(resizeID)
resizeID = setTimeout(adjust, 200)
})
})()


Expand Down
Loading

0 comments on commit 1bd3e49

Please sign in to comment.