Skip to content

Commit

Permalink
Correct typos in document.js Merge pull request #13 from felixonmars/…
Browse files Browse the repository at this point in the history
…patch-1

Correct typos in document.js
  • Loading branch information
itorr authored Aug 25, 2022
2 parents 0dd0b11 + 2426c77 commit 501605a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions html/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const toggleVoiceMute = () => {
};


let runing = true;
let running = true;

const deepCopy = v=> JSON.parse(JSON.stringify(v));

Expand Down Expand Up @@ -212,7 +212,7 @@ const init = onOver=>{
}
let or = 0;
const run = _=>{
if(!runing) return;
if(!running) return;

requestAnimationFrame(run);

Expand Down Expand Up @@ -254,7 +254,7 @@ const move = (x,y)=>{
}
el.onmousedown = e=>{
e.preventDefault();
runing = false;
running = false;
const { pageX, pageY } = e;
const _downPageX = pageX;
const _downPageY = pageY;
Expand All @@ -267,7 +267,7 @@ el.onmousedown = e=>{
document.onmousemove = null;
document.onmouseup = null;

runing = true;
running = true;
playVoice();
run();
};
Expand All @@ -287,7 +287,7 @@ el.onmousedown = e=>{

el.ontouchstart = e=>{
e.preventDefault();
runing = false;
running = false;
if(!e.touches[0]) return;

const { pageX, pageY } = e.touches[0];
Expand All @@ -301,7 +301,7 @@ el.ontouchstart = e=>{
document.ontouchmove = null;
document.ontouchend = null;

runing = true;
running = true;
playVoice();
run();
};
Expand Down

0 comments on commit 501605a

Please sign in to comment.