GraphNG: improve behavior when switching between solid/dash/dots (#30796)

This commit is contained in:
Ryan McKinley 2021-02-01 10:05:31 -08:00 committed by GitHub
parent 896d3328b6
commit fcac59107c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,9 +73,16 @@ export const LineStyleEditor: React.FC<FieldOverrideEditorProps<LineStyle, any>>
value={value?.fill || 'solid'}
options={lineFillOptions}
onChange={(v) => {
let dash: number[] | undefined = undefined;
if (v === 'dot') {
dash = parseText(dotOptions[0].value!);
} else if (v === 'dash') {
dash = parseText(dashOptions[0].value!);
}
onChange({
...value,
fill: v!,
dash,
});
}}
/>