فهرست منبع

chore: use vscode prettier

chenlei 1 سال پیش
والد
کامیت
3e8829727d
4فایلهای تغییر یافته به همراه15 افزوده شده و 6 حذف شده
  1. 0 1
      package.json
  2. 1 1
      src/configure.ts
  3. 13 3
      src/utils/hot.js
  4. 1 1
      yarn.lock

+ 0 - 1
package.json

@@ -51,7 +51,6 @@
     "lint-staged": "^11.1.2",
     "lodash-webpack-plugin": "^0.11.6",
     "node-polyfill-webpack-plugin": "^2.0.1",
-    "prettier": "^2.4.1",
     "sass": "^1.32.7",
     "sass-loader": "^12.0.0",
     "ts-jest": "^27.0.4",

+ 1 - 1
src/configure.ts

@@ -4,7 +4,7 @@ const urlParams = queryString.parse(location.search.slice(1));
 
 window.number = urlParams.m as string;
 
-if (!!performance) {
+if (performance) {
   window.navigationStart = performance.timing.navigationStart;
 } else {
   window.navigationStart = Date.now() + 300;

+ 13 - 3
src/utils/hot.js

@@ -784,7 +784,11 @@ window.initHot = function (model) {
 
         //addPoints(cornerPoint)
 
-        this.cornerPoints[player.currentPano.id] = { cornerPoint, diffLon, diffLat };
+        this.cornerPoints[player.currentPano.id] = {
+          cornerPoint,
+          diffLon,
+          diffLat,
+        };
 
         return this.cornerPoints[player.currentPano.id];
       }
@@ -917,14 +921,20 @@ window.initHot = function (model) {
         }
       } else if (state) {
         if (/* !isVideoPlayed(video) */ video.paused) {
-          console.log({ str: 'videoControl play ' + ', ' + this.sid, level: 1 });
+          console.log({
+            str: 'videoControl play ' + ', ' + this.sid,
+            level: 1,
+          });
           this.loadVideo(video);
           video.play();
           //video.currentTime = video.lastCurTime || 0
           this.changeOpaWhenPlay(video);
 
           if (isVideoPlayed(video))
-            console.log({ str: 'played ' + this.sid + video.duration, level: 1 });
+            console.log({
+              str: 'played ' + this.sid + video.duration,
+              level: 1,
+            });
         }
       }
     }

+ 1 - 1
yarn.lock

@@ -7882,7 +7882,7 @@ prettier-linter-helpers@^1.0.0:
   dependencies:
     fast-diff "^1.1.2"
 
-"prettier@^1.18.2 || ^2.0.0", prettier@^2.4.1:
+"prettier@^1.18.2 || ^2.0.0":
   version "2.7.1"
   resolved "https://registry.npmmirror.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64"
   integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==