From 786c443190cc1ccf15bd987d571aebec787a9ed0 Mon Sep 17 00:00:00 2001 From: ZoeLeeFZ Date: Sun, 28 Jun 2020 15:25:48 +0800 Subject: [PATCH] =?UTF-8?q?!1125=20=E4=BF=AE=E5=A4=8D:=E5=8F=B3=E9=94=AE?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/UI/Components/Common/Datalist.tsx | 10 +++------- src/UI/Components/SourceManage/CommonPanel.tsx | 5 +++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/UI/Components/Common/Datalist.tsx b/src/UI/Components/Common/Datalist.tsx index 2afb5fdfc..24956c7fc 100644 --- a/src/UI/Components/Common/Datalist.tsx +++ b/src/UI/Components/Common/Datalist.tsx @@ -54,6 +54,8 @@ export class DataList extends React.Component { 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 ? {
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 { /> :
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 { ); }; - get IsCtrlDown() - { - return app.Editor.KeyCtrl.KeyIsDown(KeyCode.ControlLeft); - } public render() { return ( @@ -226,6 +221,7 @@ export class DataList extends React.Component { if (e.button === MouseKey.Right) { + this.props.select(e, data); this.showContextMenu(e, data); } diff --git a/src/UI/Components/SourceManage/CommonPanel.tsx b/src/UI/Components/SourceManage/CommonPanel.tsx index 841cec563..b0482b59a 100644 --- a/src/UI/Components/SourceManage/CommonPanel.tsx +++ b/src/UI/Components/SourceManage/CommonPanel.tsx @@ -335,6 +335,11 @@ export class CommonPanel extends React.Component