aboutsummaryrefslogtreecommitdiff
path: root/js/ninja.reel
diff options
context:
space:
mode:
authorPushkar Joshi2012-06-05 14:55:17 -0700
committerPushkar Joshi2012-06-05 14:55:17 -0700
commitf6584f0704be628a91e3749e0607e855aeda2477 (patch)
treec7f69d015ef0d56b492904bd14b44be590389766 /js/ninja.reel
parent3293b0b730227c14bd4f7bd53c125b48f9886764 (diff)
parent783097854612a292ac1be18ff15d88343013f773 (diff)
downloadninja-f6584f0704be628a91e3749e0607e855aeda2477.tar.gz
Merge branch 'master' into pentool
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() {