diff options
| author | jmoenig <jens@moenig.org> | 2014-02-03 17:30:31 +0100 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2014-02-03 17:30:31 +0100 |
| commit | 8654d9c3fc084fee3a460f8d64e53cfb58370936 (patch) | |
| tree | d69dbbacb335b5e68a089e78574d319368d3f3d6 | |
| parent | 3fede790e437df776366789626b96bfd07f3cefa (diff) | |
| download | snap-yow-8654d9c3fc084fee3a460f8d64e53cfb58370936.tar.gz snap-yow-8654d9c3fc084fee3a460f8d64e53cfb58370936.zip | |
Morphic: Replaced deprecated DOM “body” references with “documentElement”
| -rwxr-xr-x | history.txt | 1 | ||||
| -rw-r--r-- | morphic.js | 9 |
2 files changed, 6 insertions, 4 deletions
diff --git a/history.txt b/history.txt index 8ff5a12..8486b1a 100755 --- a/history.txt +++ b/history.txt @@ -2074,3 +2074,4 @@ ______ 140203 ------ * Threads: Fixed #313. “Block of sprite” now works for interpolated (“timed”) blocks and for reporters (i.e. SAY FOR, THINK FOR, GLIDE, ASK etc.) +* Morphic: replace deprecated DOM “body” references with “documentElement” @@ -1035,7 +1035,7 @@ /*global window, HTMLCanvasElement, getMinimumFontHeight, FileReader, Audio, FileList, getBlurredShadowSupport*/ -var morphicVersion = '2014-January-09'; +var morphicVersion = '2014-February-03'; var modules = {}; // keep track of additional loaded modules var useBlurredShadows = getBlurredShadowSupport(); // check for Chrome-bug @@ -10029,13 +10029,14 @@ WorldMorph.prototype.fillPage = function () { this.worldCanvas.style.top = "0px"; pos.y = 0; } - if (document.body.scrollTop) { // scrolled down b/c of viewport scaling + if (document.documentElement.scrollTop) { + // scrolled down b/c of viewport scaling clientHeight = document.documentElement.clientHeight; } - if (document.body.scrollLeft) { // scrolled left b/c of viewport scaling + if (document.documentElement.scrollLeft) { + // scrolled left b/c of viewport scaling clientWidth = document.documentElement.clientWidth; } - if (this.worldCanvas.width !== clientWidth) { this.worldCanvas.width = clientWidth; this.setWidth(clientWidth); |
