|
@@ -906,6 +906,7 @@ export class EditScence extends SGraphScene {
|
|
|
}
|
|
|
if (this.grabItem) {
|
|
|
this.grabItem.onKeyDown(event);
|
|
|
+ // 创建时按esc键取消
|
|
|
if (event.code == "Escape") {
|
|
|
const item = this.grabItem;
|
|
|
this.grabItem = null
|
|
@@ -916,9 +917,11 @@ export class EditScence extends SGraphScene {
|
|
|
this.setCmd = 'choice'
|
|
|
}
|
|
|
}
|
|
|
- // if (event.key == "Enter") {
|
|
|
- // this.cmd = 0
|
|
|
- // }
|
|
|
+ //delete键删除item
|
|
|
+ if(event.code == "Delete"){
|
|
|
+ this.deleiteItem()
|
|
|
+ }
|
|
|
+
|
|
|
return false
|
|
|
}
|
|
|
|