Make the editor pane resizable.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3700 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2021-12-22 15:05:08 +00:00
parent f760d48368
commit d4f7fdfc40
5 changed files with 10 additions and 1 deletions

View File

@ -647,6 +647,7 @@ 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();
} }

View File

@ -285,6 +285,8 @@ var kStaticFiles = [
{uri: '/client.js', type: 'text/javascript; charset=UTF-8'}, {uri: '/client.js', type: 'text/javascript; charset=UTF-8'},
{uri: '/robots.txt', type: 'text/plain; charset=UTF-8'}, {uri: '/robots.txt', type: 'text/plain; charset=UTF-8'},
{uri: '/split.min.js'},
{uri: '/split.min.js.map'},
{uri: '/codemirror/codemirror.min.js'}, {uri: '/codemirror/codemirror.min.js'},
{uri: '/codemirror/base16-dark.min.css'}, {uri: '/codemirror/base16-dark.min.css'},
{uri: '/codemirror/matchesonscrollbar.min.css'}, {uri: '/codemirror/matchesonscrollbar.min.css'},
@ -344,6 +346,7 @@ async function speedScopeHandler(request, response, uri) {
'js': 'text/javascript', 'js': 'text/javascript',
'html': 'text/html', 'html': 'text/html',
'css': 'text/css', 'css': 'text/css',
'map': 'application/json',
}; };
try { try {
var data = await File.readFile("deps/speedscope/" + filename); var data = await File.readFile("deps/speedscope/" + filename);

View File

@ -42,10 +42,11 @@
</div> </div>
</div> </div>
</div> </div>
<div class="vbox" style="flex: 1 0 50%; overflow: auto"> <div id="viewPane" class="vbox" style="flex: 1 0 50%; overflow: auto">
<iframe id="document" sandbox="allow-forms allow-scripts allow-top-navigation allow-modals" style="width: 100%; height: 100%; border: 0"></iframe> <iframe id="document" sandbox="allow-forms allow-scripts allow-top-navigation allow-modals" style="width: 100%; height: 100%; border: 0"></iframe>
</div> </div>
</div> </div>
<script src="/static/split.min.js"></script>
<script src="/static/client.js"></script> <script src="/static/client.js"></script>
</body> </body>
</html> </html>

3
core/split.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
core/split.min.js.map Normal file

File diff suppressed because one or more lines are too long