mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-31 07:12:49 -04:00
Update the shift-click insertion
Insertion is now language specific.
This commit is contained in:
parent
37d7b4661c
commit
b50c3fbc89
1 changed files with 12 additions and 1 deletions
|
@ -905,7 +905,18 @@ module.exports = class SpellView extends CocoView
|
|||
|
||||
onCoordinateSelected: (e) ->
|
||||
return unless @ace.isFocused() and e.x? and e.y?
|
||||
@ace.insert "{x: #{e.x}, y: #{e.y}}"
|
||||
if @spell.language is 'python'
|
||||
@ace.insert "{\"x\": #{e.x}, \"y\": #{e.y}}"
|
||||
else if @spell.language is 'clojure'
|
||||
@ace.insert "{:x #{e.x} :y #{e.y}}"
|
||||
else if @spell.language is 'lua'
|
||||
@ace.insert "{x=#{e.x}, y=#{e.y}}"
|
||||
else if @spell.language is 'io'
|
||||
return
|
||||
else
|
||||
@ace.insert "{x: #{e.x}, y: #{e.y}}"
|
||||
|
||||
|
||||
@highlightCurrentLine()
|
||||
|
||||
onStatementIndexUpdated: (e) ->
|
||||
|
|
Loading…
Add table
Reference in a new issue