Refresh the SQL control, whenever necessary.

Also, remove the CodeMirror object for better clean up process.

When a SQL control/tab is rendered in a hidden element, it does not
render really well. Because - it rely on the height, and width of the
container to count the gutten position, and margin, and other elements.

Hence - whenever the tab, panel becomes visible, we will refresh the
control.
This commit is contained in:
Ashesh Vashi
2016-04-22 15:24:18 +05:30
parent a5aa6d159a
commit 085ce50545
4 changed files with 45 additions and 15 deletions

View File

@@ -1401,8 +1401,9 @@ define(
var editor = self.editor = CodeMirror.fromTextArea(
code_editor_area.get(0), {
lineNumbers: true,
lineWrapping: true,
gutters: ["note-gutter", "CodeMirror-linenumbers", "breakpoints"],
mode: "sql/x-pgsql",
mode: "text/x-pgsql",
readOnly: true
});