Show and hide the splitter with the editor so that it doesn't shift the content to the right when the editor is hidden.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3757 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
e1f868730f
commit
27c2f27708
@ -7,6 +7,7 @@ var gCurrentFile;
|
|||||||
var gFiles = {};
|
var gFiles = {};
|
||||||
var gApp = {files: {}};
|
var gApp = {files: {}};
|
||||||
var gEditor;
|
var gEditor;
|
||||||
|
var gSplit;
|
||||||
|
|
||||||
var kErrorColor = "#dc322f";
|
var kErrorColor = "#dc322f";
|
||||||
var kStatusColor = "#fff";
|
var kStatusColor = "#fff";
|
||||||
@ -76,6 +77,8 @@ function edit() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gSplit = Split(['#editPane', '#viewPane'], {minSize: 0});
|
||||||
|
|
||||||
ensureLoaded([
|
ensureLoaded([
|
||||||
{tagName: "script", attributes: {src: "/static/codemirror/codemirror.min.js"}},
|
{tagName: "script", attributes: {src: "/static/codemirror/codemirror.min.js"}},
|
||||||
{tagName: "link", attributes: {rel: "stylesheet", href: "/static/codemirror/base16-dark.min.css"}},
|
{tagName: "link", attributes: {rel: "stylesheet", href: "/static/codemirror/base16-dark.min.css"}},
|
||||||
@ -251,6 +254,8 @@ function load() {
|
|||||||
|
|
||||||
function closeEditor() {
|
function closeEditor() {
|
||||||
document.getElementById("editPane").style.display = 'none';
|
document.getElementById("editPane").style.display = 'none';
|
||||||
|
gSplit.destroy();
|
||||||
|
gSplit = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
function explodePath() {
|
function explodePath() {
|
||||||
@ -700,7 +705,6 @@ function removeFile() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener("load", function() {
|
window.addEventListener("load", function() {
|
||||||
Split(['#editPane', '#viewPane'], {minSize: 0});
|
|
||||||
if (window.Notification) {
|
if (window.Notification) {
|
||||||
Notification.requestPermission();
|
Notification.requestPermission();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user