Browse Source

water dot

deepsea 1 year ago
parent
commit
caf71bf18c
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/store/modules/bench/mutations.js

+ 5 - 2
src/store/modules/bench/mutations.js

@@ -10,8 +10,11 @@ export default {
       for (let key in benchInfo) {
         bench[key] = benchInfo[key]
       }
-      bench.left = Math.random() * 90 + (i * (Math.random() * 10 + 10)) + 300;
-      bench.top = Math.random() * 80 + (i * (Math.random() * 10 + 10)) + 200;
+      if (!bench.isFixed) {
+        bench.left = Math.random() * 90 + (i * (Math.random() * 10 + 10)) + 300;
+        bench.top = Math.random() * 80 + (i * (Math.random() * 10 + 10)) + 200;
+        bench.isFixed = true;
+      }
 
       bench.status = "ready";
       bench.name = "";