Skip to content

Commit

Permalink
fix(右键菜单): 右键菜单显示快捷建错误问题修复
Browse files Browse the repository at this point in the history
  • Loading branch information
bigFace2019 committed Nov 3, 2024
1 parent 1a08d57 commit 631dab1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions packages/core/plugin/CenterAlignPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* @Author: 秦少卫
* @Date: 2023-06-15 22:49:42
* @LastEditors: 秦少卫
* @LastEditTime: 2024-07-09 14:12:41
* @LastEditors: bigFace2019 599069310@qq.com
* @LastEditTime: 2024-11-03 20:39:43
* @Description: 居中对齐插件
*/

Expand Down Expand Up @@ -59,7 +59,7 @@ class CenterAlignPlugin implements IPluginTempl {
return [
{
text: '水平垂直居中',
hotkey: 'Ctrl+V',
hotkey: '',
disabled: false,
onclick: () => this.position('center'),
},
Expand Down
9 changes: 6 additions & 3 deletions packages/core/plugin/DeleteHotKeyPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* @Author: 秦少卫
* @Date: 2023-06-20 12:57:35
* @LastEditors: 秦少卫
* @LastEditTime: 2024-04-10 17:33:02
* @LastEditors: bigFace2019 599069310@qq.com
* @LastEditTime: 2024-11-03 20:38:33
* @Description: 删除快捷键
*/

Expand Down Expand Up @@ -42,7 +42,10 @@ class DeleteHotKeyPlugin implements IPluginTempl {
contextMenu() {
const activeObject = this.canvas.getActiveObject();
if (activeObject) {
return [null, { text: '删除', hotkey: 'Ctrl+V', disabled: false, onclick: () => this.del() }];
return [
null,
{ text: '删除', hotkey: 'Backspace', disabled: false, onclick: () => this.del() },
];
}
}

Expand Down

0 comments on commit 631dab1

Please sign in to comment.