zhouenguang hace 3 años
padre
commit
85e45b2323
Se han modificado 1 ficheros con 2 adiciones y 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",