forked from cory/tildefriends
		
	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:
		| @@ -7,6 +7,7 @@ var gCurrentFile; | ||||
| var gFiles = {}; | ||||
| var gApp = {files: {}}; | ||||
| var gEditor; | ||||
| var gSplit; | ||||
|  | ||||
| var kErrorColor = "#dc322f"; | ||||
| var kStatusColor = "#fff"; | ||||
| @@ -76,6 +77,8 @@ function edit() { | ||||
| 		return; | ||||
| 	} | ||||
|  | ||||
| 	gSplit = Split(['#editPane', '#viewPane'], {minSize: 0}); | ||||
|  | ||||
| 	ensureLoaded([ | ||||
| 		{tagName: "script", attributes: {src: "/static/codemirror/codemirror.min.js"}}, | ||||
| 		{tagName: "link", attributes: {rel: "stylesheet", href: "/static/codemirror/base16-dark.min.css"}}, | ||||
| @@ -251,6 +254,8 @@ function load() { | ||||
|  | ||||
| function closeEditor() { | ||||
| 	document.getElementById("editPane").style.display = 'none'; | ||||
| 	gSplit.destroy(); | ||||
| 	gSplit = undefined; | ||||
| } | ||||
|  | ||||
| function explodePath() { | ||||
| @@ -700,7 +705,6 @@ function removeFile() { | ||||
| } | ||||
|  | ||||
| window.addEventListener("load", function() { | ||||
| 	Split(['#editPane', '#viewPane'], {minSize: 0}); | ||||
| 	if (window.Notification) { | ||||
| 		Notification.requestPermission(); | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user