deepsea hace 1 año
padre
commit
caf71bf18c
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  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 = "";