瀏覽代碼

fix: floor feedback not to be displayed when S1 is in B mode and selected position is after correct position

lairaalmas 1 年之前
父節點
當前提交
30679210de
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      js/games/squareOne.js

+ 5 - 5
js/games/squareOne.js

@@ -711,12 +711,12 @@ const squareOne = {
         } else {
           let max = self.floor.selectedIndex,
             min = self.floor.curIndex;
-          //if (min < max) {
-          for (let i = min + 1; i <= max; i++) {
-            self.floor.list[i].fillColor = colors.red;
-            self.floor.list[i].alpha = 1;
+          if (min < max) {
+            for (let i = min + 1; i <= max; i++) {
+              self.floor.list[i].fillColor = colors.red;
+              self.floor.list[i].alpha = 1;
+            }
           }
-          //}
         }
       }