Browse Source

Added support for delete button on mac

David Catuhe 5 năm trước cách đây
mục cha
commit
10617d4667
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      nodeEditor/src/graphEditor.tsx

+ 1 - 1
nodeEditor/src/graphEditor.tsx

@@ -175,7 +175,7 @@ export class GraphEditor extends React.Component<IGraphEditorProps, State> {
         }
 
         this.props.globalState.hostDocument!.addEventListener("keydown", evt => {
-            if (evt.keyCode === 46 && !this.props.globalState.blockKeyboardEvents) { // Delete                
+            if ((evt.keyCode === 46 || evt.keyCode === 8) && !this.props.globalState.blockKeyboardEvents) { // Delete                
                 let selectedItems = this._graphCanvas.selectedNodes;
 
                 for (var selectedItem of selectedItems) {