From 1538d9cd04d0ca3cdd90c9586ee7e16bed21a547 Mon Sep 17 00:00:00 2001 From: Alex Ottoboni Date: Tue, 20 Dec 2016 23:13:52 -0800 Subject: [PATCH] Editor View Only The model preview is hidden when the `?editor` URL parameter is given. The editor then takes up the entire width of the screen. --- sources/shdr/App.coffee | 2 ++ sources/shdr/UI.coffee | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/sources/shdr/App.coffee b/sources/shdr/App.coffee index 3f4b79f..7ccd2f4 100644 --- a/sources/shdr/App.coffee +++ b/sources/shdr/App.coffee @@ -20,6 +20,8 @@ class App @extend(@conf, conf) @ui = new shdr.UI(@) return if not @initViewer(domCanvas) + if window.location.search.substring(1) == 'editor' + @ui.hideViewer() @initEditor(domEditor) @initFromURL() @byId(domEditor).addEventListener('keyup', ((e) => @onEditorKeyUp(e)), off) diff --git a/sources/shdr/UI.coffee b/sources/shdr/UI.coffee index 20656c0..7cd4c91 100644 --- a/sources/shdr/UI.coffee +++ b/sources/shdr/UI.coffee @@ -15,6 +15,11 @@ class UI @initBoxes() @resetLoadFiles() + hideViewer: -> + $('#panel-right').fadeOut(100) + $('#panel-left').css('right', '0%') + $('#mid-separator').css('left', '100%') + hideMainLoader: -> $('#main-loader').fadeOut(400)