fixing little issues
This commit is contained in:
parent
18abd0351a
commit
b047cb0e1f
6 changed files with 11 additions and 9 deletions
|
@ -38,7 +38,7 @@ const SvgWrapper = props => {
|
|||
<div style={{ width: size.width+'px', }}>
|
||||
<Svg {...patternProps} embed={gist.embed}>
|
||||
<Defs {...patternProps} />
|
||||
<style>{`:root { --pattern-scale: ${gist.scale || 1}}`}</style>
|
||||
<style>{`:root { --pattern-scale: ${gist.scale || 1}} ${patternProps.svg.style}`}</style>
|
||||
<g>
|
||||
{Object.keys(patternProps.parts).map((name) => (
|
||||
<Part {...{ app, gist, updateGist, unsetGist, showInfo }}
|
||||
|
|
|
@ -92,7 +92,7 @@ const DesignOptionPctDeg = props => {
|
|||
/>
|
||||
<div className="flex flex-row justify-between">
|
||||
<span className={val===dflt ? 'text-secondary' : 'text-accent'}>
|
||||
{props.design.config.options[props.option]?.toAbs
|
||||
{props.design.config.options[props.option]?.toAbs && props.gist.measurements
|
||||
? formatMm(props.design.config.options[props.option].toAbs(value/100, props.gist))
|
||||
: ' '
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ export const values = {
|
|||
: 'text-accent'
|
||||
}>
|
||||
{formatPercentage(val)}
|
||||
{props.design.config.options[props.option]?.toAbs
|
||||
{props.design.config.options[props.option]?.toAbs && props.gist.measurements
|
||||
? ' | ' +formatMm(props.design.config.options[props.option]?.toAbs(val, props.gist))
|
||||
: null
|
||||
}
|
||||
|
|
|
@ -11,9 +11,9 @@ const Option = props => {
|
|||
const type = optionType(opt)
|
||||
const Input = inputs[type]
|
||||
const Value = values[type]
|
||||
const hide = opt.hide && opt.hide(props.draft.settings);
|
||||
const hide = opt.hide && opt.hide(props.draft.settings.options);
|
||||
|
||||
if (hide) return <Li></Li>
|
||||
if (hide) return null
|
||||
|
||||
if (type === 'bool') {
|
||||
const toggleBoolean = () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue