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

View file

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