diff --git a/package-lock.json b/package-lock.json index 88a28a6..e936f30 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8612,9 +8612,9 @@ "dev": true }, "node_modules/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", "dev": true, "engines": { "node": ">= 0.6" @@ -10711,18 +10711,17 @@ } }, "node_modules/express": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz", - "integrity": "sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==", + "version": "4.21.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", + "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", "dev": true, - "license": "MIT", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.6.0", + "cookie": "0.7.1", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", diff --git a/src/components/legend/legend.js b/src/components/legend/legend.js index 858699e..73b49be 100644 --- a/src/components/legend/legend.js +++ b/src/components/legend/legend.js @@ -101,16 +101,12 @@ export const MapLegend = () => { const nodeRef = useRef(null); // declare the width min/max for the legend card - //const minWidth = 45; - //const maxWidth = 75; - const minWidth = 65; - const maxWidth = 95; + const minWidth = 45; + const maxWidth = 75; // declare the height min/max for the legend card - //const minHeight = 250; - //const maxHeight = 350; - const minHeight = 300; - const maxHeight = 400; + const minHeight = 250; + const maxHeight = 350; return ( { const handleChange = (event, newValue) => { // make sure the first thumb value is not >= the second - if (newValue[0] < newValue[1]) { + // and that second is >= sliderStep + if ((newValue[0] < newValue[1]) && (newValue[1] >= sliderStep)) { setValue(newValue); } }; @@ -193,6 +194,11 @@ export const ColormapSlider = ({style}) => { if (newValue[0] === newValue[1]) { newValue[0] = newValue[0]-sliderStep; } + // since min slider value doesn't appear to work, make + // sure lower slider value is never less tha 0 + newValue[0] = (newValue[0] < 0) ? 0 : newValue[0]; + // also check for 0 upper value - set sliderStep as lowest value + newValue[1] = (newValue[1] < sliderStep) ? sliderStep : newValue[1]; setValue([newValue[0], newValue[1]]); // now create new style with altered data range