From 302ae3c1812086d976eb67c9cf693c43205f3904 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Thu, 16 Feb 2012 11:13:05 -0800 Subject: hide the rulers when no document is open Signed-off-by: Ananya Sen --- css/ninja.css | 4 ++-- js/ninja.reel/ninja.css | 2 -- js/ninja.reel/ninja.html | 4 ++-- js/stage/stage-view.reel/stage-view.js | 4 ++-- scss/imports/scss/_MainWindow.scss | 2 ++ 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/css/ninja.css b/css/ninja.css index 0be30434..824a675a 100755 --- a/css/ninja.css +++ b/css/ninja.css @@ -118,9 +118,9 @@ body { position: absolute; margin: 0px; width: 100%; height: 100%; background-co #sceneBar { height: 70px; background-color: #474747; } -#mainContainer #rulerTop { background: url("../images/temp/ruler-top.png"); height: 15px; margin-bottom: 0px; } +#mainContainer #rulerTop { background: url("../images/temp/ruler-top.png"); height: 15px; margin-bottom: 0px; display:none;} -#rulerLeft { background: url("../images/temp/ruler-left.png"); width: 16px; } +#rulerLeft { background: url("../images/temp/ruler-left.png"); width: 16px; display:none;} #stateBar { height: 20px; background-color: #282828; margin-bottom: 0px; } diff --git a/js/ninja.reel/ninja.css b/js/ninja.reel/ninja.css index 99fa9a4f..83c0e569 100755 --- a/js/ninja.reel/ninja.css +++ b/js/ninja.reel/ninja.css @@ -7,5 +7,3 @@ .main { padding: 100px; } - - diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html index 2d00d8dc..9a1a6b97 100755 --- a/js/ninja.reel/ninja.html +++ b/js/ninja.reel/ninja.html @@ -348,10 +348,10 @@
- +
- +
diff --git a/js/stage/stage-view.reel/stage-view.js b/js/stage/stage-view.reel/stage-view.js index 2144af84..cd19f361 100755 --- a/js/stage/stage-view.reel/stage-view.js +++ b/js/stage/stage-view.reel/stage-view.js @@ -123,7 +123,7 @@ exports.StageView = Montage.create(Component, { switchDocument:{ value: function(doc){ //save editor cursor position - if(!!this.application.ninja.documentController.activeDocument.editor){ + if(!!this.application.ninja.documentController.activeDocument && !!this.application.ninja.documentController.activeDocument.editor){ this.application.ninja.documentController.activeDocument.hline = this.application.ninja.documentController.activeDocument.editor.getCursor(true); } this.application.ninja.documentController._hideCurrentDocument(); @@ -136,7 +136,7 @@ exports.StageView = Montage.create(Component, { var documentController = this.application.ninja.documentController; //restore editor cursor position - if(!!this.application.ninja.documentController.activeDocument.editor){ + if(!!this.application.ninja.documentController.activeDocument && !!this.application.ninja.documentController.activeDocument.editor){ this.application.ninja.documentController.activeDocument.editor.setCursor(this.application.ninja.documentController.activeDocument.hline); document.getElementById("codeMirror_"+this.application.ninja.documentController.activeDocument.uuid).getElementsByClassName("CodeMirror")[0].focus(); } diff --git a/scss/imports/scss/_MainWindow.scss b/scss/imports/scss/_MainWindow.scss index b5ff42bc..0b0649dc 100755 --- a/scss/imports/scss/_MainWindow.scss +++ b/scss/imports/scss/_MainWindow.scss @@ -204,12 +204,14 @@ background: url("../images/temp/ruler-top.png"); height:15px; margin-bottom: 0px; + display:none; } #rulerLeft { // TODO: temporary background please replace when component is implemented background: url("../images/temp/ruler-left.png"); width:16px; + display:none; } #stateBar { -- cgit v1.2.3