deepsea 1 vuosi sitten
vanhempi
commit
caf71bf18c
1 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  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 = "";