!1125 修复:右键资源错误

pull/1125/MERGE
ZoeLeeFZ 4 years ago committed by ChenX
parent 257e9c7290
commit 786c443190

@ -54,6 +54,8 @@ export class DataList extends React.Component<IDataListProps> {
className={(this.props.selectData.has(data[this.props.idKey]) ? "selected " : "") + (this.props.activeId === data[this.props.idKey] ? "actived" : "")}
onDragStart={() => this.handleDragStart(data)}
style={this.props.liStyle}
onMouseDown={(e) => this.handleMouseDown(e, data)}
onMouseUp={(e) => this.handleMouseUp(e, data)}
>
{
this.props.preview ? <Popover
@ -75,7 +77,6 @@ export class DataList extends React.Component<IDataListProps> {
<div
onMouseDown={(e) => this.handleMouseDown(e, data)}
onDoubleClick={() => this.handleDbImgClick(data)}
onMouseUp={(e) => this.handleMouseUp(e, data)}
className={this.props.hintClassName}
draggable="true"
style={{ outline: "none" }}
@ -86,8 +87,6 @@ export class DataList extends React.Component<IDataListProps> {
/> :
<div
className={"look-mat " + this.props.hintClassName}
onMouseDown={(e) => this.handleMouseDown(e, data)}
onMouseUp={(e) => this.handleMouseUp(e, data)}
onDoubleClick={() => this.handleDbImgClick(data)}
draggable="true"
>
@ -183,10 +182,6 @@ export class DataList extends React.Component<IDataListProps> {
</>
);
};
get IsCtrlDown()
{
return app.Editor.KeyCtrl.KeyIsDown(KeyCode.ControlLeft);
}
public render()
{
return (
@ -226,6 +221,7 @@ export class DataList extends React.Component<IDataListProps> {
if (e.button === MouseKey.Right)
{
this.props.select(e, data);
this.showContextMenu(e, data);
}

@ -335,6 +335,11 @@ export class CommonPanel extends React.Component<ICommonPanelProps, ICommonPanel
if (!this.IsCtrlDown)
selectIds.clear();
}
else
{
if (!this.IsCtrlDown && !selectIds.has(id))
selectIds.clear();
}
if (this.IsCtrlDown)
{

Loading…
Cancel
Save