mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 16:33:15 +01:00
fix choice widget value issie
This commit is contained in:
parent
7e39a9bd62
commit
818cf67a1a
2 changed files with 5 additions and 5 deletions
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue