fix choice widget value issie

This commit is contained in:
Val Erastov 2022-07-24 12:00:06 -07:00
parent 7e39a9bd62
commit 818cf67a1a
2 changed files with 5 additions and 5 deletions

View file

@ -35,9 +35,9 @@ export const PatternRadialOperation: OperationDescriptor<patternRadialParams> =
params.inputBodies.forEach((shellToPatern, index) => { params.inputBodies.forEach((shellToPatern, index) => {
for (let i = 2; i <= params.qty; i++) { for (let i = 2; i <= params.qty; i++) {
let angleForInstance; let angleForInstance;
if (params.patternMethod == 'step angle') { if (params.patternMethod == 'step') {
angleForInstance = params.angle*(i-1); angleForInstance = params.angle*(i-1);
} else if (params.patternMethod == 'span angle') { } else if (params.patternMethod == 'span') {
angleForInstance = (params.angle / (params.qty))*(i-1); angleForInstance = (params.angle / (params.qty))*(i-1);
} else { } else {
throw 'unsupported pattern type: ' + params.patternMethod; throw 'unsupported pattern type: ' + params.patternMethod;
@ -79,8 +79,8 @@ export const PatternRadialOperation: OperationDescriptor<patternRadialParams> =
label: 'Pattern Method', label: 'Pattern Method',
name: "patternMethod", name: "patternMethod",
style: "dropdown", style: "dropdown",
defaultValue: "step angle", defaultValue: "step",
values: ['step angle','span angle',], values: [['step', 'Step Angle'], ['span', 'Span Angle']],
}, },
{ {
type: 'number', type: 'number',

View file

@ -53,8 +53,8 @@ export function attachToForm(Control): any {
const fullPathFlatten = flattenPath(fullPath); const fullPathFlatten = flattenPath(fullPath);
const onChange = value => { const onChange = value => {
console.log(fullPath + " : " + value);
formEdit.onChange(fullPath, value); formEdit.onChange(fullPath, value);
setActive(true);
} }
const setActive = (isActive) => formEdit.setActive(fullPathFlatten, isActive); const setActive = (isActive) => formEdit.setActive(fullPathFlatten, isActive);