Skip to content

Commit

Permalink
fix: SENSEBEE-8277: 【annotation】拉框选中时 space + 左键拖动会有点小问题
Browse files Browse the repository at this point in the history
  • Loading branch information
laoluo committed Nov 24, 2021
1 parent 50a3565 commit 4cd2c72
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,14 @@ class RectOperation extends BasicToolOperation {
const hoverRectID = this.getHoverRectID(e);

const firstRect = this.currentShowList.find((v) => v.id === this.selectedRectID);
if (!firstRect || e.button !== 0) {

/**
* 拖拽基础判断,如果包含以下行为则直接禁止操作
* 1. 不存在框体
* 2. 拖拽行为下禁止操作 - 右键
* 3. 拖拽行为下禁止操作 - 左键 + space
*/
if (!firstRect || e.button === 2 || (e.button === 0 && this.isSpaceKey === true)) {
return;
}

Expand Down

0 comments on commit 4cd2c72

Please sign in to comment.