Explorar o código

mol-util: palette fix missing valueLabel function

David Sehnal %!s(int64=5) %!d(string=hai) anos
pai
achega
9d413bf0eb
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/mol-util/color/palette.ts

+ 1 - 1
src/mol-util/color/palette.ts

@@ -80,7 +80,7 @@ export function getPalette(count: number, props: PaletteProps) {
             count = Math.min(count, props.palette.params.maxCount)
             colors = distinctColors(count, props.palette.params)
         }
-        const { valueLabel } = props.palette.params
+        const valueLabel = props.palette.params.valueLabel || (i => '' + i);
         const colorsLength = colors.length
         const table: [string, Color][] = []
         for (let i = 0; i < count; ++i) {