zhouenguang %!s(int64=3) %!d(string=hai) anos
pai
achega
85e45b2323
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/JoyStick.js

+ 2 - 2
src/JoyStick.js

@@ -20,8 +20,8 @@ export default class JoyStick {
         a.style.position = "absolute",
         a.style.width = "200px",
         a.style.height = "200px",
-        a.style.left = String(n.left),
-        a.style.bottom = String(n.bottom),
+        a.style.left = String(n.left || 0),
+        a.style.bottom = String(n.bottom || 0),
         a.style.zIndex = "999",
         a.style.userSelect = "none",
         a.style.webkitUserSelect = "none",