-
-
Notifications
You must be signed in to change notification settings - Fork 118
Expand file tree
/
Copy pathCodeView.js
More file actions
46 lines (38 loc) · 1.17 KB
/
CodeView.js
File metadata and controls
46 lines (38 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* Project Name : Visual Python
* Description : GUI-based Python code generator
* File Name : CodeView.js
* Author : Black Logic
* Note : Render Code view
* License : GNU GPLv3 with Visual Python special exception
* Date : 2021. 09. 13
* Change Date :
*/
//============================================================================
// [CLASS] CodeView
//============================================================================
define([
'../com/component/PopupComponent'
], function(PopupComponent) {
'use strict';
/**
* @class CodeView
* @constructor
*/
class CodeView extends PopupComponent {
_init() {
super._init();
this.config.footer = false;
this.config.sizeLevel = 1;
this.state = {
codeview: '',
...this.state
}
this._addCodemirror('codeview', this.wrapSelector('#codeview'), "readonly");
}
templateForBody() {
return `<textarea id="codeview">${this.state.codeview}</textarea>`;
}
}
return CodeView;
});