aboutsummaryrefslogtreecommitdiff
path: root/js/ninja.reel
diff options
context:
space:
mode:
authorAnanya Sen2012-06-07 11:59:32 -0700
committerAnanya Sen2012-06-07 11:59:32 -0700
commit7378b6846f140106490f10c02cd7cec6a19023aa (patch)
tree90b60c007696b4a73c29abbae82562f69f15c11a /js/ninja.reel
parentaea0e6879abfef02a827ed239ef091c3b96d6eb2 (diff)
parentb75fe9369f7caec0351d298f7106c8d59572b440 (diff)
downloadninja-7378b6846f140106490f10c02cd7cec6a19023aa.tar.gz
Merge branch 'refs/heads/ninja-internal-master' into cut-copy-paste
Diffstat (limited to 'js/ninja.reel')
-rwxr-xr-xjs/ninja.reel/ninja.js41
1 files changed, 36 insertions, 5 deletions
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js
index a12270a0..38f5efcf 100755
--- a/js/ninja.reel/ninja.js
+++ b/js/ninja.reel/ninja.js
@@ -4,10 +4,11 @@
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. 4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */ 5 </copyright> */
6 6
7var Montage = require("montage/core/core").Montage, 7var Montage = require("montage/core/core").Montage,
8 Component = require("montage/ui/component").Component, 8 Component = require("montage/ui/component").Component,
9 UndoManager = require("montage/core/undo-manager").UndoManager, 9 UndoManager = require("montage/core/undo-manager").UndoManager,
10 AppData = require("js/data/appdata").AppData; 10 AppData = require("js/data/appdata").AppData,
11 Popup = require("js/components/popup.reel").Popup;
11 12
12var matrix = require("js/lib/math/matrix"); 13var matrix = require("js/lib/math/matrix");
13var NjUtils = require("js/lib/NJUtils").NJUtils; 14var NjUtils = require("js/lib/NJUtils").NJUtils;
@@ -195,14 +196,44 @@ exports.Ninja = Montage.create(Component, {
195 196
196 197
197 //////////////////////////////////////////////////////////////////// 198 ////////////////////////////////////////////////////////////////////
199 ////////////////////////////////////////////////////////////////////
198 //TODO: Expand method to allow other browsers for preview 200 //TODO: Expand method to allow other browsers for preview
199 executeChromePreview: { 201 executeChromePreview: {
200 value: function () { 202 value: function () {
201 this.currentDocument.model.browserPreview('chrome'); 203 //TODO: Make into proper component
204 this.saveOperationScreen = {};
205 this._saveOperationPopup = {};
206 //Show
207 this.saveOperationScreen.show = function (ctxt) {
208 //
209 ctxt._saveOperationPopup.blackout = document.createElement('div');
210 ctxt._saveOperationPopup.blackout.style.width = '100%';
211 ctxt._saveOperationPopup.blackout.style.height = '100%';
212 ctxt._saveOperationPopup.blackout.style.background = 'rgba(0,0,0,0.8)'; //'-webkit-radial-gradient(center, ellipse cover, rgba(0,0,0,.65) 0%, rgba(0,0,0,0.8) 80%)';
213 ctxt.application.ninja.popupManager.addPopup(ctxt._saveOperationPopup.blackout);
214 };
215 //Hide
216 this.saveOperationScreen.hide = function (ctxt) {
217 ctxt.application.ninja.popupManager.removePopup(ctxt._saveOperationPopup.blackout);
218 };
219 //
220 this.currentDocument.model.browserPreview('chrome', this.saveOperationScreen, this);
202 } 221 }
203 }, 222 },
204 //////////////////////////////////////////////////////////////////// 223 ////////////////////////////////////////////////////////////////////
205 224
225 //TODO: Make into proper component
226 _saveOperationPopup: {
227 value: null
228 },
229 //TODO: Make into proper component
230 saveOperationScreen: {
231 value: null
232 },
233
234 ////////////////////////////////////////////////////////////////////
235 ////////////////////////////////////////////////////////////////////
236
206 237
207 handleResize: { 238 handleResize: {
208 value: function() { 239 value: function() {