aboutsummaryrefslogtreecommitdiff
path: root/js/ninja.reel/ninja.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-07-09 14:35:44 -0700
committerValerio Virgillito2012-07-09 14:35:44 -0700
commit84b3327bd92faafab7954b5eb64c7abe24a3fe13 (patch)
tree3f56cbed2f08c5a81ea79eaf0bcb9bd031d8a627 /js/ninja.reel/ninja.js
parentc0a42c56f768a873ba637f5b86d5f6a84d4a3312 (diff)
parent40c6eb2c06b34f65a74d59ef9687251952858bab (diff)
downloadninja-84b3327bd92faafab7954b5eb64c7abe24a3fe13.tar.gz
Merge branch 'normalize' of https://github.com/kriskowal/ninja-internal
Conflicts: js/components/gradientpicker.reel/gradientpicker.js js/components/tools-properties/text-properties.reel/text-properties.js js/document/views/base.js js/document/views/design.js js/helper-classes/3D/StageLine.js js/helper-classes/3D/draw-utils.js js/lib/drawing/world.js js/lib/geom/circle.js js/lib/geom/line.js js/lib/geom/rectangle.js js/lib/geom/shape-primitive.js js/lib/rdge/materials/bump-metal-material.js js/lib/rdge/materials/flag-material.js js/lib/rdge/materials/fly-material.js js/lib/rdge/materials/julia-material.js js/lib/rdge/materials/keleidoscope-material.js js/lib/rdge/materials/mandel-material.js js/lib/rdge/materials/material.js js/lib/rdge/materials/plasma-material.js js/lib/rdge/materials/pulse-material.js js/lib/rdge/materials/radial-gradient-material.js js/lib/rdge/materials/taper-material.js js/lib/rdge/materials/twist-vert-material.js js/lib/rdge/materials/water-material.js js/panels/Materials/materials-library-panel.reel/materials-library-panel.html js/panels/Materials/materials-library-panel.reel/materials-library-panel.js js/panels/Materials/materials-popup.reel/materials-popup.html js/panels/Materials/materials-popup.reel/materials-popup.js js/tools/LineTool.js Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/ninja.reel/ninja.js')
-rwxr-xr-xjs/ninja.reel/ninja.js100
1 files changed, 50 insertions, 50 deletions
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js
index 3fe39aa7..6de15490 100755
--- a/js/ninja.reel/ninja.js
+++ b/js/ninja.reel/ninja.js
@@ -28,11 +28,11 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28POSSIBILITY OF SUCH DAMAGE. 28POSSIBILITY OF SUCH DAMAGE.
29</copyright> */ 29</copyright> */
30 30
31var Montage = require("montage/core/core").Montage, 31var Montage = require("montage/core/core").Montage,
32 Component = require("montage/ui/component").Component, 32 Component = require("montage/ui/component").Component,
33 UndoManager = require("montage/core/undo-manager").UndoManager, 33 UndoManager = require("montage/core/undo-manager").UndoManager,
34 AppData = require("js/data/appdata").AppData, 34 AppData = require("js/data/appdata").AppData,
35 Popup = require("js/components/popup.reel").Popup; 35 Popup = require("js/components/popup.reel").Popup;
36 36
37var matrix = require("js/lib/math/matrix"); 37var matrix = require("js/lib/math/matrix");
38var NjUtils = require("js/lib/NJUtils").NJUtils; 38var NjUtils = require("js/lib/NJUtils").NJUtils;
@@ -215,7 +215,7 @@ exports.Ninja = Montage.create(Component, {
215 } 215 }
216 }, 216 },
217 217
218 _workspaceMode: { 218 _workspaceMode: {
219 value: null 219 value: null
220 }, 220 },
221 221
@@ -370,7 +370,7 @@ exports.Ninja = Montage.create(Component, {
370 window.addEventListener("resize", this, false); 370 window.addEventListener("resize", this, false);
371 //Prompting the user to make sure data was saved before closing Ninja 371 //Prompting the user to make sure data was saved before closing Ninja
372 window.onbeforeunload = function () { 372 window.onbeforeunload = function () {
373 return 'Are you sure you want to close Ninja? Any unsaved data will be lost.'; 373 return 'Are you sure you want to close Ninja? Any unsaved data will be lost.';
374 }; 374 };
375 375
376 this.eventManager.addEventListener("selectTool", this, false); 376 this.eventManager.addEventListener("selectTool", this, false);
@@ -381,48 +381,48 @@ exports.Ninja = Montage.create(Component, {
381 this.addPropertyChangeListener("appModel.debug", this.toggleDebug, false); 381 this.addPropertyChangeListener("appModel.debug", this.toggleDebug, false);
382 } 382 }
383 }, 383 },
384 384
385 385
386 //////////////////////////////////////////////////////////////////// 386 ////////////////////////////////////////////////////////////////////
387 //////////////////////////////////////////////////////////////////// 387 ////////////////////////////////////////////////////////////////////
388 //TODO: Expand method to allow other browsers for preview 388 //TODO: Expand method to allow other browsers for preview
389 executeChromePreview: { 389 executeChromePreview: {
390 value: function () { 390 value: function () {
391 //TODO: Make into proper component 391 //TODO: Make into proper component
392 this.saveOperationScreen = {}; 392 this.saveOperationScreen = {};
393 this._saveOperationPopup = {}; 393 this._saveOperationPopup = {};
394 //Show 394 //Show
395 this.saveOperationScreen.show = function (ctxt) { 395 this.saveOperationScreen.show = function (ctxt) {
396 // 396 //
397 ctxt._saveOperationPopup.blackout = document.createElement('div'); 397 ctxt._saveOperationPopup.blackout = document.createElement('div');
398 ctxt._saveOperationPopup.blackout.style.width = '100%'; 398 ctxt._saveOperationPopup.blackout.style.width = '100%';
399 ctxt._saveOperationPopup.blackout.style.height = '100%'; 399 ctxt._saveOperationPopup.blackout.style.height = '100%';
400 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%)'; 400 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%)';
401 ctxt.application.ninja.popupManager.addPopup(ctxt._saveOperationPopup.blackout); 401 ctxt.application.ninja.popupManager.addPopup(ctxt._saveOperationPopup.blackout);
402 }; 402 };
403 //Hide 403 //Hide
404 this.saveOperationScreen.hide = function (ctxt) { 404 this.saveOperationScreen.hide = function (ctxt) {
405 ctxt.application.ninja.popupManager.removePopup(ctxt._saveOperationPopup.blackout); 405 ctxt.application.ninja.popupManager.removePopup(ctxt._saveOperationPopup.blackout);
406 }; 406 };
407 // 407 //
408 this.currentDocument.model.browserPreview('chrome', this.saveOperationScreen, this); 408 this.currentDocument.model.browserPreview('chrome', this.saveOperationScreen, this);
409 } 409 }
410 }, 410 },
411 //////////////////////////////////////////////////////////////////// 411 ////////////////////////////////////////////////////////////////////
412 412
413 //TODO: Make into proper component 413 //TODO: Make into proper component
414 _saveOperationPopup: { 414 _saveOperationPopup: {
415 value: null 415 value: null
416 }, 416 },
417 //TODO: Make into proper component 417 //TODO: Make into proper component
418 saveOperationScreen: { 418 saveOperationScreen: {
419 value: null 419 value: null
420 }, 420 },
421 421
422 //////////////////////////////////////////////////////////////////// 422 ////////////////////////////////////////////////////////////////////
423 //////////////////////////////////////////////////////////////////// 423 ////////////////////////////////////////////////////////////////////
424 424
425 425
426 handleResize: { 426 handleResize: {
427 value: function() { 427 value: function() {
428 this.stage.resizeCanvases = true; 428 this.stage.resizeCanvases = true;
@@ -444,14 +444,14 @@ exports.Ninja = Montage.create(Component, {
444 _didDraw: { 444 _didDraw: {
445 value: false 445 value: false
446 }, 446 },
447 447
448 didDraw: { 448 didDraw: {
449 value: function() { 449 value: function() {
450 450
451 if(!this._didDraw) { 451 if(!this._didDraw) {
452 if (!this.application.ninja.coreIoApi.ioServiceDetected) { 452 if (!this.application.ninja.coreIoApi.ioServiceDetected) {
453 var check = this.application.ninja.coreIoApi.cloudAvailable(); 453 var check = this.application.ninja.coreIoApi.cloudAvailable();
454 } 454 }
455 NJevent("appLoaded"); 455 NJevent("appLoaded");
456 this._didDraw = true; 456 this._didDraw = true;
457 } 457 }