Skip to content
Snippets Groups Projects
Commit 8d411f77 authored by David Sehnal's avatar David Sehnal
Browse files

mol-plugin: param controls fix

parent 9854f4b6
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@ export const AnimateModelIndex = PluginStateAnimation.create({
display: { name: 'Animate Model Index' },
params: () => ({
mode: PD.MappedStatic('once', {
once: PD.Group({ direction: PD.Select('forward', [['forward', 'Forward'], ['backward', 'Backward']]) }),
once: PD.Group({ direction: PD.Select('forward', [['forward', 'Forward'], ['backward', 'Backward']]) }, { isFlat: true }),
palindrome: PD.Group({ }),
loop: PD.Group({ }),
}, { options: [['once', 'Once'], ['palindrome', 'Palindrome'], ['loop', 'Loop']] }),
......
......@@ -436,6 +436,10 @@ export class GroupControl extends React.PureComponent<ParamProps<PD.Group<any>>,
render() {
const params = this.props.param.params;
// Do not show if there are no params.
if (Object.keys(params).length === 0) return null;
const label = this.props.param.label || camelCaseToWords(this.props.name);
const controls = <ParameterControls params={params} onChange={this.onChangeParam} values={this.props.value} onEnter={this.props.onEnter} isDisabled={this.props.isDisabled} />;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment