diff --git a/src/mol-math/linear-algebra/3d/vec3.ts b/src/mol-math/linear-algebra/3d/vec3.ts index 0a71f8ec34cc5a29db82edbed8b079e5137b267f..d55b4ee8a79c6abccef76f75969fffe2813ffe83 100644 --- a/src/mol-math/linear-algebra/3d/vec3.ts +++ b/src/mol-math/linear-algebra/3d/vec3.ts @@ -35,7 +35,7 @@ function Vec3() { namespace Vec3 { export function zero(): Vec3 { - const out = [0.1, 0.0, 0.0]; // ensure backing array of type double + const out = [0.1, 0.0, 0.0]; // ensure backing array of type double out[0] = 0; return out as any; } diff --git a/src/mol-plugin-ui/custom/volume.tsx b/src/mol-plugin-ui/custom/volume.tsx index 3cee8ba417a4973ce7523a911ff1a296fb6c6468..0a13a436e087795313b51dd9ac5999822b4df229 100644 --- a/src/mol-plugin-ui/custom/volume.tsx +++ b/src/mol-plugin-ui/custom/volume.tsx @@ -251,15 +251,15 @@ export class VolumeStreamingCustomControls extends PluginUIComponent<StateTransf ...detailLevel, label: 'Dynamic Detail', defaultValue: (entry.params.view as any).map('camera-target').params.dynamicDetailLevel.defaultValue, - } + }; const selectionDetailLevel = { ...detailLevel, label: 'Selection Detail', defaultValue: (entry.params.view as any).map('auto').params.selectionDetailLevel.defaultValue, - } + }; const sampling = b.info.header.sampling[0]; - + const isRelative = ((params.entry.params.channels as any)[pivot].isoValue as Volume.IsoValue).kind === 'relative'; const isRelativeParam = PD.Boolean(isRelative, { description: 'Use normalized or absolute isocontour scale.', label: 'Normalized' }); @@ -290,7 +290,7 @@ export class VolumeStreamingCustomControls extends PluginUIComponent<StateTransf }, { description: 'Box around focused element.' }), 'camera-target': PD.Group({ radius: PD.Numeric(0.5, { min: 0, max: 1, step: 0.05 }, { description: 'Radius within which the volume is shown (relative to the field of view).' }), - detailLevel: {...detailLevel, isHidden: true}, + detailLevel: { ...detailLevel, isHidden: true }, dynamicDetailLevel: dynamicDetailLevel, isRelative: isRelativeParam, isUnbounded: isUnboundedParam, diff --git a/src/mol-plugin/behavior/behavior.ts b/src/mol-plugin/behavior/behavior.ts index 2784c630affe15b9bd834fe187b73ff91462b66e..ddbb603c351f26f63978ca998ea3d5a5bab7475b 100644 --- a/src/mol-plugin/behavior/behavior.ts +++ b/src/mol-plugin/behavior/behavior.ts @@ -146,17 +146,17 @@ namespace PluginBehavior { this.subs.push(cmd.subscribe(this.plugin, action)); } protected subscribeObservable<T>(o: Observable<T>, action: (v: T) => void): PluginCommand.Subscription { - const sub = o.subscribe(action) + const sub = o.subscribe(action); this.subs.push(sub); - return { + return { unsubscribe: () => { const idx = this.subs.indexOf(sub); - if (idx >= 0){ + if (idx >= 0) { this.subs.splice(idx, 1); sub.unsubscribe(); } - } - } + } + }; } dispose(): void { for (const s of this.subs) s.unsubscribe(); diff --git a/src/mol-plugin/behavior/dynamic/volume-streaming/behavior.ts b/src/mol-plugin/behavior/dynamic/volume-streaming/behavior.ts index 2baea3519af22bae52e8f7c3838b7c7dfbea2be5..4cec92de8bb504f853a67911c156743f13c22453 100644 --- a/src/mol-plugin/behavior/dynamic/volume-streaming/behavior.ts +++ b/src/mol-plugin/behavior/dynamic/volume-streaming/behavior.ts @@ -399,7 +399,7 @@ export namespace VolumeStreaming { radius *= relativeRadius; let radiusX, radiusY, radiusZ; if (boundByBoundarySize) { - let bBoxSize = Vec3.zero(); + const bBoxSize = Vec3.zero(); Box3D.size(bBoxSize, this.data.structure.boundary.box); radiusX = Math.min(radius, 0.5 * bBoxSize[0]); radiusY = Math.min(radius, 0.5 * bBoxSize[1]); diff --git a/src/mol-util/single-async-queue.ts b/src/mol-util/single-async-queue.ts index 97a97b50224d6c82915cd8ac9385f39ad9ab6209..be62698d1af38e9c140324e9784b21530f051749 100644 --- a/src/mol-util/single-async-queue.ts +++ b/src/mol-util/single-async-queue.ts @@ -5,7 +5,7 @@ */ -/** Job queue that allows at most one running and one pending job. +/** Job queue that allows at most one running and one pending job. * A newly enqueued job will cancel any other pending jobs. */ export class SingleAsyncQueue { private isRunning: boolean; @@ -22,7 +22,7 @@ export class SingleAsyncQueue { if (this.log) console.log('SingleAsyncQueue enqueue', this.counter); this.queue[0] = { id: this.counter, func: job }; this.counter++; - this.run(); // do not await + this.run(); // do not await } private async run() { if (this.isRunning) return;