Minor tweaks

This commit is contained in:
Ozzie Gooen 2022-05-31 16:01:13 -07:00
parent 6cfb0f18ef
commit 6b7b3b049a
2 changed files with 5 additions and 1 deletions

View File

@ -8,7 +8,6 @@
"@hookform/resolvers": "^2.8.10",
"@quri/squiggle-lang": "^0.2.8",
"@react-hook/size": "^2.1.2",
"@tailwindcss/forms": "^0.5.2",
"lodash": "^4.17.21",
"react": "^18.1.0",
"react-ace": "^10.1.0",
@ -31,6 +30,7 @@
"@storybook/node-logger": "^6.5.6",
"@storybook/preset-create-react-app": "^4.1.1",
"@storybook/react": "^6.5.6",
"@tailwindcss/forms": "^0.5.2",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^14.2.0",

View File

@ -45,6 +45,10 @@ export const DistributionChart: React.FC<DistributionChartProps> = ({
shape.value.discrete.some((x) => x.x <= 0);
let spec = buildVegaSpec(isLogX, isExpY);
let widthProp = width ? width : size.width;
if (widthProp < 20) {
console.warn(`Width of Distribution is set to ${widthProp}, which is too small`)
widthProp = 20
}
// Check whether we should disable the checkbox
var logCheckbox = (