From ce0385f73ec84e85fbe8ce06bdaaed61181ad24c Mon Sep 17 00:00:00 2001 From: Alexander Rose <alex.rose@rcsb.org> Date: Thu, 6 Sep 2018 12:02:05 -0700 Subject: [PATCH] formating --- src/mol-data/int/sorted-ranges.ts | 2 +- src/mol-data/util/hash-functions.ts | 3 ++- src/mol-gl/webgl/program.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mol-data/int/sorted-ranges.ts b/src/mol-data/int/sorted-ranges.ts index d51ba6331..967595e0f 100644 --- a/src/mol-data/int/sorted-ranges.ts +++ b/src/mol-data/int/sorted-ranges.ts @@ -18,7 +18,7 @@ namespace SortedRanges { export function max<T extends number = number>(ranges: SortedRanges<T>) { return ranges[ranges.length - 1] } export function size<T extends number = number>(ranges: SortedRanges<T>) { let size = 0 - for(let i = 0, il = ranges.length; i < il; i += 2) { + for (let i = 0, il = ranges.length; i < il; i += 2) { size += ranges[i + 1] - ranges[i] + 1 } return size diff --git a/src/mol-data/util/hash-functions.ts b/src/mol-data/util/hash-functions.ts index 001eaf5e1..0f6726942 100644 --- a/src/mol-data/util/hash-functions.ts +++ b/src/mol-data/util/hash-functions.ts @@ -1,7 +1,8 @@ /** - * Copyright (c) 2017 mol* contributors, licensed under MIT, See LICENSE file for more info. + * Copyright (c) 2017-2018 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal <david.sehnal@gmail.com> + * @author Alexander Rose <alexander.rose@weirdbyte.de> */ // from http://burtleburtle.net/bob/hash/integer.html diff --git a/src/mol-gl/webgl/program.ts b/src/mol-gl/webgl/program.ts index 46047d664..34fa9501e 100644 --- a/src/mol-gl/webgl/program.ts +++ b/src/mol-gl/webgl/program.ts @@ -117,7 +117,7 @@ export type ProgramCache = ReferenceCache<Program, ProgramProps, Context> export function createProgramCache(): ProgramCache { return createReferenceCache( (props: ProgramProps) => { - const array = [props.shaderCode.id] + const array = [ props.shaderCode.id ] Object.keys(props.defineValues).forEach(k => { const v = props.defineValues[k].ref.value array.push(hashString(k), typeof v === 'boolean' ? v ? 1 : 0 : hashString(v)) -- GitLab