zhouenguang 3 년 전
부모
커밋
85e45b2323
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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",