Make DEL key delete selected items (With confirmation still :P ) (#1058)
* add del key * made DEL key into delete shortcut
This commit is contained in:
parent
45a15da896
commit
00ecb0f6bb
1 changed files with 5 additions and 2 deletions
|
@ -30,6 +30,10 @@ const Listeners = {
|
||||||
case 27: // if esc key is pressed
|
case 27: // if esc key is pressed
|
||||||
JIT.escKeyHandler()
|
JIT.escKeyHandler()
|
||||||
break
|
break
|
||||||
|
case 46: // if DEL is pressed
|
||||||
|
e.preventDefault()
|
||||||
|
Control.deleteSelected()
|
||||||
|
break
|
||||||
case 65: // if a or A is pressed
|
case 65: // if a or A is pressed
|
||||||
if ((e.ctrlKey || e.metaKey) && onCanvas) {
|
if ((e.ctrlKey || e.metaKey) && onCanvas) {
|
||||||
const nodesCount = Object.keys(Visualize.mGraph.graph.nodes).length
|
const nodesCount = Object.keys(Visualize.mGraph.graph.nodes).length
|
||||||
|
@ -123,7 +127,6 @@ const Listeners = {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
$(window).resize(function() {
|
$(window).resize(function() {
|
||||||
if (Visualize && Visualize.mGraph) {
|
if (Visualize && Visualize.mGraph) {
|
||||||
Util.resizeCanvas(Visualize.mGraph.canvas)
|
Util.resizeCanvas(Visualize.mGraph.canvas)
|
||||||
|
|
Loading…
Add table
Reference in a new issue