diff --git a/client/index.html b/client/index.html
index 6731482..1d06fff 100644
--- a/client/index.html
+++ b/client/index.html
@@ -1,4 +1,4 @@
-
+
🐝🕷🕷🐞🐞🦗🦗🦗🐜🐜🐜
diff --git a/client/index.js b/client/index.js
index 6ba56e2..4ee265f 100644
--- a/client/index.js
+++ b/client/index.js
@@ -54,21 +54,21 @@ function upload (positions) {
ws.send(JSON.stringify(['position', ...positions]))
}
-function getCoordsFromEvent ({clientX, clientY, touches}) {
+function getCoordsFromEvent ({pageX, pageY, touches}) {
if (touches) {
const {
- clientX,
- clientY
+ pageX,
+ pageY
} = touches[0]
return {
- x: clientX - radius,
- y: clientY - radius
+ x: pageX - radius,
+ y: pageY - radius
}
}
return {
- x: clientX - radius,
- y: clientY - radius
+ x: pageX - radius,
+ y: pageY - radius
}
}
@@ -101,8 +101,6 @@ function update ([id, x, y, z]) {
const handleDown = event => {
if (!event.target.classList.contains(pieceClass)) return
- document.body.style.overflow = 'hidden'
-
element = event.target
dragging = true
element.style.position = 'absolute'
@@ -120,7 +118,7 @@ const handleMove = event => {
const handleUp = event => {
const {id} = element
const {x, y, z} = positions[id]
- document.body.style.overflow = 'initial'
+
dragging = false
element = null
upload([id, x, y, z])
diff --git a/client/index.sass b/client/index.sass
index 40b05b0..190bef3 100644
--- a/client/index.sass
+++ b/client/index.sass
@@ -86,7 +86,7 @@
bottom: -($size * 0.353)
border-bottom: $border
border-left: $border
-body
+html, body
background-color: #226699
color: white
height: 100%