deepsea 1 year ago
parent
commit
666a367365
1 changed files with 6 additions and 7 deletions
  1. 6 7
      src/views/ordinaryPage/index.vue

+ 6 - 7
src/views/ordinaryPage/index.vue

@@ -2388,9 +2388,9 @@ export default {
       try{
         for(let key in window.waterMap) {
           if (key == benchId) {
-            window.waterMap[key].position.set(1.3, 1.3, 1.3);
+            window.waterMap[key].scale.set(1.3, 1.3, 1.3);
           } else {
-            window.waterMap[key].position.set(1, 1, 1);
+            window.waterMap[key].scale.set(1, 1, 1);
           }
         }
       } catch (e) {
@@ -2428,10 +2428,7 @@ export default {
         //{
         //  element.style = "{background: rgba(0, 0, 0, 1)}"
         //});
-        if (
-          benchId == this.currentBench.id &&
-          this.currentBench.selected == true
-        ) {
+        if (benchId == this.currentBench.id &&this.currentBench.selected) {
           this.currentBench.selected = false;
           this.currentBench.scale = 1;
           this.currentBench = {};
@@ -2449,7 +2446,9 @@ export default {
           let itemOther = this.benchList.find(
             (b) => parseInt(b.id) == parseInt(title[0].textContent)
           );
-          itemOther.selected = false;
+          if (itemOther) {
+            itemOther.selected = false;
+          }
           if (parseInt(benchId) == parseInt(title[0].textContent)) {
             items[index].style.background = "#000000C0";
             this.currentBench = this.benchList.find((b) => b.id == benchId);