Merge pull request #256 from giraugh/chore/update-hue-map
Update hue-map to v1.0
This commit is contained in:
commit
bb2fa742db
|
|
@ -14,7 +14,7 @@
|
|||
"dayjs": "^1.11.5",
|
||||
"gapi-script": "^1.2.0",
|
||||
"goober": "^2.1.10",
|
||||
"hue-map": "^0.1.1",
|
||||
"hue-map": "^1.0.0",
|
||||
"i18next": "^21.9.0",
|
||||
"i18next-browser-languagedetector": "^6.1.5",
|
||||
"i18next-http-backend": "^1.4.1",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import dayjs from 'dayjs'
|
|||
import localeData from 'dayjs/plugin/localeData'
|
||||
import customParseFormat from 'dayjs/plugin/customParseFormat'
|
||||
import relativeTime from 'dayjs/plugin/relativeTime'
|
||||
import createPalette from 'hue-map'
|
||||
import { createPalette } from 'hue-map'
|
||||
|
||||
import { useSettingsStore, useLocaleUpdateStore } from '/src/stores'
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ const AvailabilityViewer = ({
|
|||
useEffect(() => setPalette(createPalette({
|
||||
map: colormap === 'crabfit' ? [[0, [247,158,0,0]], [1, [247,158,0,255]]] : colormap,
|
||||
steps: tempFocus !== null ? 2 : Math.min(max, filteredPeople.length)+1,
|
||||
})), [tempFocus, filteredPeople, max, colormap])
|
||||
}).format()), [tempFocus, filteredPeople, max, colormap])
|
||||
|
||||
const heatmap = useMemo(() => (
|
||||
<Container>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { useState, useEffect } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import createPalette from 'hue-map'
|
||||
import { createPalette } from 'hue-map'
|
||||
|
||||
import { useSettingsStore } from '/src/stores'
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ const Legend = ({
|
|||
useEffect(() => setPalette(createPalette({
|
||||
map: colormap === 'crabfit' ? [[0, [247,158,0,0]], [1, [247,158,0,255]]] : colormap,
|
||||
steps: max+1-min,
|
||||
})), [min, max, colormap])
|
||||
}).format()), [min, max, colormap])
|
||||
|
||||
return (
|
||||
<Wrapper>
|
||||
|
|
|
|||
|
|
@ -2185,10 +2185,10 @@ html-parse-stringify@^3.0.1:
|
|||
dependencies:
|
||||
void-elements "3.1.0"
|
||||
|
||||
hue-map@^0.1.1:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/hue-map/-/hue-map-0.1.1.tgz#d6b199f4121df56aaf1901222323545f0607a31d"
|
||||
integrity sha512-aH3Maa39vHN+yTkWXdLcTN8M+ftGOX6NvGuMObl2puWxwoUZhm3gLlKA6SdpqJphF1RzQo0ntsm0Psg0uc7ouQ==
|
||||
hue-map@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/hue-map/-/hue-map-1.0.0.tgz#16061043db2015c15dcfb9229390ca7c7fb27cd4"
|
||||
integrity sha512-L7n6cfthm9ZTdYbqJF1yBflHvI4MaWRg+XMJ4Ifc35jWcOfQlCRBETZ4ntnHLPUyDOse7KeelcsbWxx14Aaa+w==
|
||||
|
||||
i18next-browser-languagedetector@^6.1.5:
|
||||
version "6.1.5"
|
||||
|
|
|
|||
Loading…
Reference in a new issue