mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-27 21:31:16 -04:00
Adds shortcuts for undo/redo for thangs tab view
This commit is contained in:
parent
f3f57c8581
commit
efa2bee08c
1 changed files with 8 additions and 0 deletions
|
@ -57,6 +57,8 @@ module.exports = class ThangsTabView extends View
|
|||
'delete, del, backspace': 'deleteSelectedExtantThang'
|
||||
'left': -> @moveAddThangSelection -1
|
||||
'right': -> @moveAddThangSelection 1
|
||||
'ctrl+z': 'undoAction'
|
||||
'ctrl+shift+z': 'redoAction'
|
||||
|
||||
constructor: (options) ->
|
||||
super options
|
||||
|
@ -450,6 +452,12 @@ module.exports = class ThangsTabView extends View
|
|||
$('#add-thangs-column').toggle()
|
||||
@onWindowResize e
|
||||
|
||||
undoAction: (e) ->
|
||||
@thangsTreema.undo()
|
||||
|
||||
redoAction: (e) ->
|
||||
@thangsTreema.redo()
|
||||
|
||||
class ThangsNode extends TreemaNode.nodeMap.array
|
||||
valueClass: 'treema-array-replacement'
|
||||
getChildren: ->
|
||||
|
|
Loading…
Add table
Reference in a new issue