Skip to content

Commit

Permalink
添加严格模式&&去除argument使用
Browse files Browse the repository at this point in the history
  • Loading branch information
llan committed Jan 19, 2017
1 parent 76f20d1 commit 754437d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions index.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
body {
margin: 0;
padding: 0;
background-color: rgb(246, 244, 236);
}

.site {
Expand Down
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Created by llan on 2017/1/11.
*/
'use strict';
/**
* 方块
* @param params
Expand Down Expand Up @@ -240,14 +241,14 @@ const block = function (params) {
* 方块自由下落
* @type {number}
*/
const fallDown = setTimeout(function () {
const fallDown = setTimeout(function loop() {
let moveDown = canMove(arr).canMoveDown;
if (moveDown) {
for (let v of activityModels) {
v.style.top = `calc(${v.style.top} + ${BLOCK_SIZE}px)`;
}
curTop++;
setTimeout(arguments.callee, delay / window.__level__);
setTimeout(loop, delay / window.__level__);
} else {
for (let i = 0; i < activityModels.length; i++) {
activityModels[i].className = 'inactiveModel'
Expand Down

0 comments on commit 754437d

Please sign in to comment.