summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2014-02-03 17:30:31 +0100
committerjmoenig <jens@moenig.org>2014-02-03 17:30:31 +0100
commit8654d9c3fc084fee3a460f8d64e53cfb58370936 (patch)
treed69dbbacb335b5e68a089e78574d319368d3f3d6
parent3fede790e437df776366789626b96bfd07f3cefa (diff)
downloadsnap-8654d9c3fc084fee3a460f8d64e53cfb58370936.tar.gz
snap-8654d9c3fc084fee3a460f8d64e53cfb58370936.zip
Morphic: Replaced deprecated DOM “body” references with “documentElement”
-rwxr-xr-xhistory.txt1
-rw-r--r--morphic.js9
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”
diff --git a/morphic.js b/morphic.js
index c5aa561..b55b180 100644
--- a/morphic.js
+++ b/morphic.js
@@ -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);