diff options
author | Ananya Sen | 2012-02-16 11:13:05 -0800 |
---|---|---|
committer | Ananya Sen | 2012-02-16 11:13:05 -0800 |
commit | 302ae3c1812086d976eb67c9cf693c43205f3904 (patch) | |
tree | 9fab5d67dab44cfa411b395f0ac73285b456062a /js | |
parent | 2e766c9eaa98fa20f311b3eb2f892a1a240e90cf (diff) | |
download | ninja-302ae3c1812086d976eb67c9cf693c43205f3904.tar.gz |
hide the rulers when no document is open
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js')
-rwxr-xr-x | js/ninja.reel/ninja.css | 2 | ||||
-rwxr-xr-x | js/ninja.reel/ninja.html | 4 | ||||
-rwxr-xr-x | js/stage/stage-view.reel/stage-view.js | 4 |
3 files changed, 4 insertions, 6 deletions
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 @@ | |||
7 | .main { | 7 | .main { |
8 | padding: 100px; | 8 | padding: 100px; |
9 | } | 9 | } |
10 | |||
11 | |||
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 @@ | |||
348 | <div id="openDocumentsTabComponent"></div> | 348 | <div id="openDocumentsTabComponent"></div> |
349 | </section> | 349 | </section> |
350 | 350 | ||
351 | <section id="rulerTop" style="display:none;"></section> | 351 | <section id="rulerTop"></section> |
352 | 352 | ||
353 | <section id="mainContent"> | 353 | <section id="mainContent"> |
354 | <section id="rulerLeft" style="display:none;"></section> | 354 | <section id="rulerLeft"></section> |
355 | <section id="stageAndScenesContainer"></section> | 355 | <section id="stageAndScenesContainer"></section> |
356 | </section> | 356 | </section> |
357 | 357 | ||
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, { | |||
123 | switchDocument:{ | 123 | switchDocument:{ |
124 | value: function(doc){ | 124 | value: function(doc){ |
125 | //save editor cursor position | 125 | //save editor cursor position |
126 | if(!!this.application.ninja.documentController.activeDocument.editor){ | 126 | if(!!this.application.ninja.documentController.activeDocument && !!this.application.ninja.documentController.activeDocument.editor){ |
127 | this.application.ninja.documentController.activeDocument.hline = this.application.ninja.documentController.activeDocument.editor.getCursor(true); | 127 | this.application.ninja.documentController.activeDocument.hline = this.application.ninja.documentController.activeDocument.editor.getCursor(true); |
128 | } | 128 | } |
129 | this.application.ninja.documentController._hideCurrentDocument(); | 129 | this.application.ninja.documentController._hideCurrentDocument(); |
@@ -136,7 +136,7 @@ exports.StageView = Montage.create(Component, { | |||
136 | var documentController = this.application.ninja.documentController; | 136 | var documentController = this.application.ninja.documentController; |
137 | 137 | ||
138 | //restore editor cursor position | 138 | //restore editor cursor position |
139 | if(!!this.application.ninja.documentController.activeDocument.editor){ | 139 | if(!!this.application.ninja.documentController.activeDocument && !!this.application.ninja.documentController.activeDocument.editor){ |
140 | this.application.ninja.documentController.activeDocument.editor.setCursor(this.application.ninja.documentController.activeDocument.hline); | 140 | this.application.ninja.documentController.activeDocument.editor.setCursor(this.application.ninja.documentController.activeDocument.hline); |
141 | document.getElementById("codeMirror_"+this.application.ninja.documentController.activeDocument.uuid).getElementsByClassName("CodeMirror")[0].focus(); | 141 | document.getElementById("codeMirror_"+this.application.ninja.documentController.activeDocument.uuid).getElementsByClassName("CodeMirror")[0].focus(); |
142 | } | 142 | } |