| 331 | } |
| 332 | |
| 333 | configureAce (ace, codeLanguage) { |
| 334 | const aceSession = ace.getSession() |
| 335 | aceSession.setUseWorker(false) |
| 336 | aceSession.setMode(aceUtils.aceEditModes[codeLanguage]) |
| 337 | aceSession.setWrapLimitRange(null) |
| 338 | aceSession.setUseWrapMode(true) |
| 339 | aceSession.setNewLineMode('unix') |
| 340 | aceSession.setUseSoftTabs(true) |
| 341 | ace.setTheme('ace/theme/textmate') |
| 342 | ace.setDisplayIndentGuides(false) |
| 343 | ace.setShowPrintMargin(false) |
| 344 | ace.setShowInvisibles(false) |
| 345 | ace.setBehavioursEnabled(false) |
| 346 | ace.setAnimatedScroll(true) |
| 347 | ace.setShowFoldWidgets(false) |
| 348 | ace.$blockScrolling = Infinity |
| 349 | } |
| 350 | |
| 351 | destroy () { |
| 352 | for (const blocklyWorkspace of this.blocklyWorkspaces) { |