From 39b29fe0eadffc91a018523dea344e9a45d6a691 Mon Sep 17 00:00:00 2001
From: Alexander Rose <alexander.rose@weirdbyte.de>
Date: Sun, 12 Jan 2020 13:23:37 -0800
Subject: [PATCH] formating & code style

---
 src/mol-geo/util.ts         |  2 +-
 src/mol-state/action.ts     |  8 ++++----
 src/mol-util/async-queue.ts |  2 +-
 src/mol-util/memoize.ts     |  2 +-
 src/mol-util/now.ts         |  4 ++--
 src/mol-util/object.ts      | 10 +++++-----
 src/perf-tests/structure.ts |  6 +++---
 7 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/mol-geo/util.ts b/src/mol-geo/util.ts
index 99cf5f6d6..c09d0aae0 100644
--- a/src/mol-geo/util.ts
+++ b/src/mol-geo/util.ts
@@ -106,7 +106,7 @@ export function computeVertexNormals<T extends NumberArray> (vertices: NumberArr
     const cb = Vec3.zero()
     const ab = Vec3.zero()
 
-     for (let i = 0, il = vertices.length; i < il; i += 9) {
+    for (let i = 0, il = vertices.length; i < il; i += 9) {
         Vec3.fromArray(a, vertices, i)
         Vec3.fromArray(b, vertices, i + 3)
         Vec3.fromArray(c, vertices, i + 6)
diff --git a/src/mol-state/action.ts b/src/mol-state/action.ts
index 25d174ab0..07547cf5a 100644
--- a/src/mol-state/action.ts
+++ b/src/mol-state/action.ts
@@ -107,13 +107,13 @@ namespace StateAction {
                 display: typeof info.display === 'string'
                     ? { name: info.display }
                     : !!info.display
-                    ? info.display
-                    : { name: 'Unnamed State Action' },
+                        ? info.display
+                        : { name: 'Unnamed State Action' },
                 params: typeof info.params === 'object'
                     ? () => info.params as any
                     : !!info.params
-                    ? info.params as any
-                    : void 0,
+                        ? info.params as any
+                        : void 0,
                 isApplicable: info.isApplicable,
                 ...(typeof def === 'function'
                     ? { run: def }
diff --git a/src/mol-util/async-queue.ts b/src/mol-util/async-queue.ts
index b11407251..2551fe58b 100644
--- a/src/mol-util/async-queue.ts
+++ b/src/mol-util/async-queue.ts
@@ -29,7 +29,7 @@ export class AsyncQueue<T> {
     remove(v: T) {
         const rem = arrayRemoveInPlace(this.queue, v);
         if (rem)
-        this.signal.next({ v, stillPresent: false })
+            this.signal.next({ v, stillPresent: false })
         return rem;
     }
 
diff --git a/src/mol-util/memoize.ts b/src/mol-util/memoize.ts
index c91d1f3e7..0e9b8b82a 100644
--- a/src/mol-util/memoize.ts
+++ b/src/mol-util/memoize.ts
@@ -4,7 +4,7 @@
  * @author David Sehnal <david.sehnal@gmail.com>
  */
 
- /** Cache the latest result from calls to a function with any number of arguments */
+/** Cache the latest result from calls to a function with any number of arguments */
 export function memoizeLatest<Args extends any[], T>(f: (...args: Args) => T): (...args: Args) => T {
     let lastArgs: any[] | undefined = void 0, value: any = void 0;
     return (...args) => {
diff --git a/src/mol-util/now.ts b/src/mol-util/now.ts
index 7a88af574..1354ea96f 100644
--- a/src/mol-util/now.ts
+++ b/src/mol-util/now.ts
@@ -4,8 +4,8 @@
  * @author David Sehnal <david.sehnal@gmail.com>
  */
 
-declare var process: any;
-declare var window: any;
+declare const process: any;
+declare const window: any;
 
 const now: () => now.Timestamp = (function () {
     if (typeof window !== 'undefined' && window.performance) {
diff --git a/src/mol-util/object.ts b/src/mol-util/object.ts
index 38e194d55..927d7c180 100644
--- a/src/mol-util/object.ts
+++ b/src/mol-util/object.ts
@@ -66,11 +66,11 @@ export function deepClone<T>(source: T): T {
     if (null === source || 'object' !== typeof source) return source;
 
     if (source instanceof Array) {
-      const copy: any[] = [];
-      for (let i = 0, len = source.length; i < len; i++) {
-          copy[i] = deepClone(source[i]);
-      }
-      return copy as any as T;
+        const copy: any[] = [];
+        for (let i = 0, len = source.length; i < len; i++) {
+            copy[i] = deepClone(source[i]);
+        }
+        return copy as any as T;
     }
 
     if (source instanceof Object) {
diff --git a/src/perf-tests/structure.ts b/src/perf-tests/structure.ts
index 00bd25ed5..8f7d1ac4e 100644
--- a/src/perf-tests/structure.ts
+++ b/src/perf-tests/structure.ts
@@ -380,11 +380,11 @@ export namespace PropertyAccess {
     }
 
     export async function run() {
-        // const { structures, models/*, mmcif*/ } = await getBcif('1cbs');
+        // const { structures, models/* , mmcif */ } = await getBcif('1cbs');
         // const { structures, models } = await getBcif('3j3q');
 
-        const { structures, models /*, mmcif*/ } = await readCIF('e:/test/quick/1cbs_updated.cif');
-        // const { structures: s1, /*, mmcif*/ } = await readCIF('e:/test/quick/1tqn_updated.cif');
+        const { structures, models /* , mmcif */ } = await readCIF('e:/test/quick/1cbs_updated.cif');
+        // const { structures: s1, /* , mmcif */ } = await readCIF('e:/test/quick/1tqn_updated.cif');
 
         // testGrouping(structures[0]);
         // console.log('------');
-- 
GitLab