!3005 修复: 删除分享图设置里颜色选择器中多余的选项(256)并修复点击与消失的冲突

pull/2993/MERGE
张子涵 1 month ago committed by ChenX
parent 696eb6d9be
commit 896d995b05

@ -114,7 +114,7 @@ export function ColorSelect({ value, onChange, options }: SelectProps)
if (index === options.length - 1) return;
return (
<li
onClick={e =>
onMouseDown={e =>
{
e.stopPropagation();
selectOption(index);

@ -46,6 +46,7 @@ export class ShareBoardInfoConfiguration extends React.Component<{ store: ShareV
render()
{
const option = this.props.store.m_Option;
const ColorList = ColorPalette.slice(0, 257); // 限制在[0, 255]
return (
<div id="ShareBoardInfoPanel" className={Classes.DIALOG_CONTAINER}>
<div className={Classes.DIALOG} >
@ -104,7 +105,7 @@ export class ShareBoardInfoConfiguration extends React.Component<{ store: ShareV
<div className="label">
<span>线:</span>
<ColorSelect
options={JSON.parse(JSON.stringify(ColorPalette)).map((rgb, index) => ({ value: rgb, label: index }))}
options={JSON.parse(JSON.stringify(ColorList)).map((rgb, index) => ({ value: rgb, label: index }))}
value={option.Physical2EdgeColor}
onChange={(value) =>
{

Loading…
Cancel
Save