aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/components/layout/bread-crumb.reel/bread-crumb.js2
-rwxr-xr-xjs/controllers/document-controller.js4
-rwxr-xr-xjs/controllers/styles-controller.js6
-rw-r--r--js/controllers/tree-controller.js185
-rwxr-xr-xjs/document/templates/montage-html/package.json3
-rwxr-xr-xjs/helper-classes/3D/snap-manager.js4
-rwxr-xr-xjs/helper-classes/3D/view-utils.js80
-rw-r--r--js/io/system/ninjalibrary.js28
-rw-r--r--js/io/system/ninjalibrary.json4
-rwxr-xr-xjs/lib/drawing/world.js6
-rwxr-xr-xjs/lib/geom/brush-stroke.js2
-rwxr-xr-xjs/lib/geom/circle.js1433
-rwxr-xr-xjs/lib/geom/geom-obj.js852
-rwxr-xr-xjs/lib/geom/line.js914
-rwxr-xr-xjs/lib/geom/rectangle.js1409
-rwxr-xr-xjs/lib/geom/sub-path.js2
-rwxr-xr-xjs/panels/Materials/materials-library-panel.reel/materials-library-panel.html2
-rw-r--r--js/panels/presets/animations-presets.reel/animations-presets.html5
-rw-r--r--js/panels/presets/style-presets.reel/style-presets.html2
-rw-r--r--js/panels/presets/transitions-presets.reel/transitions-presets.html5
-rwxr-xr-xjs/stage/stage-view.reel/stage-view.css29
-rwxr-xr-xjs/tools/LineTool.js3
-rwxr-xr-xjs/tools/OvalTool.js2
-rwxr-xr-xjs/tools/RectTool.js2
-rwxr-xr-xjs/tools/SelectionTool.js2
-rwxr-xr-xjs/tools/TextTool.js40
-rwxr-xr-xjs/tools/TranslateObject3DTool.js9
-rwxr-xr-xjs/tools/drawing-tool-base.js5
28 files changed, 2525 insertions, 2515 deletions
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js
index e396bdbf..c1b021a3 100755
--- a/js/components/layout/bread-crumb.reel/bread-crumb.js
+++ b/js/components/layout/bread-crumb.reel/bread-crumb.js
@@ -23,7 +23,7 @@ exports.Breadcrumb = Montage.create(Component, {
23 value: function(){ 23 value: function(){
24 if(!this.application.ninja.documentController.activeDocument) { 24 if(!this.application.ninja.documentController.activeDocument) {
25 this.disabled = true; 25 this.disabled = true;
26 this.application.ninja.currentSelectedContainer = this.application.ninja.currentDocument.documentRoot; 26 this.application.ninja.currentSelectedContainer = (this.application.ninja.currentDocument ? this.application.ninja.currentDocument.documentRoot : null);
27 } 27 }
28 } 28 }
29 }, 29 },
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index 803519a7..2be2e214 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -427,10 +427,6 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
427 427
428 closeDocument: { 428 closeDocument: {
429 value: function(id) { 429 value: function(id) {
430 if(this.activeDocument.needsSave === true){
431 //if file dirty then alert user to save
432 }
433
434 var doc = this._findDocumentByUUID(id); 430 var doc = this._findDocumentByUUID(id);
435 431
436 var closeDocumentIndex = this._findIndexByUUID(id); 432 var closeDocumentIndex = this._findIndexByUUID(id);
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js
index ec4314f9..2ff3e235 100755
--- a/js/controllers/styles-controller.js
+++ b/js/controllers/styles-controller.js
@@ -795,7 +795,9 @@ var stylesController = exports.StylesController = Montage.create(Component, {
795 ///// method to apply/test the new value 795 ///// method to apply/test the new value
796 dec.setProperty(property, value, priority); 796 dec.setProperty(property, value, priority);
797 797
798 this.styleSheetModified(rule.parentStyleSheet); 798 if(rule.parentStyleSheet) {
799 this.styleSheetModified(rule.parentStyleSheet);
800 }
799 801
800 ///// Return browser value for value we just set 802 ///// Return browser value for value we just set
801 return dec.getPropertyValue(property); 803 return dec.getPropertyValue(property);
@@ -1102,7 +1104,7 @@ var stylesController = exports.StylesController = Montage.create(Component, {
1102 ///// The dominant rule might not have the style property defined - why? 1104 ///// The dominant rule might not have the style property defined - why?
1103 ///// If no rules have the property defined, we can use the 1105 ///// If no rules have the property defined, we can use the
1104 ///// most-specific single-target rule as the dominant rule (for setting styles) 1106 ///// most-specific single-target rule as the dominant rule (for setting styles)
1105 return element.ownerDocument.defaultView.getComputedStyle(element).getPropertyValue(property); 1107 return (element.ownerDocument.defaultView ? element.ownerDocument.defaultView.getComputedStyle(element).getPropertyValue(property) : null);
1106 } 1108 }
1107 1109
1108 return value; 1110 return value;
diff --git a/js/controllers/tree-controller.js b/js/controllers/tree-controller.js
deleted file mode 100644
index 2b2e910c..00000000
--- a/js/controllers/tree-controller.js
+++ /dev/null
@@ -1,185 +0,0 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */
6/**
7 @module montage/ui/controller/tree-controller
8 @requires montage/core/core
9 @requires montage/ui/controller/object-controller
10 @requires montage/core/event/mutable-event
11 */
12var Montage = require("montage").Montage,
13 ObjectController = require("montage/ui/controller/object-controller").ObjectController,
14 ArrayController = require("montage/ui/controller/array-controller").ArrayController,
15 MutableEvent = require("montage/core/event/mutable-event").MutableEvent;
16/**
17 TODO: Write description like the array controllers: The ArrayController helps with organizing a hierarchical
18 collection of objects, and managing user selection within that collection.
19 You can assign a TreeController instance as the <code>contentProvider</code> property for a TreeView object.
20 @class module:montage/ui/controller/tree-controller.TreeController
21 @classdesc
22 @extends module:montage/ui/controller/object-controller.ObjectController
23*/
24var TreeController = exports.TreeController = Montage.create(ObjectController, /** @lends module:montage/ui/controller/tree-controller.TreeController# */ {
25
26 rootKey : {
27 value: null
28 },
29
30 branchKey : {
31 value: 'children'
32 },
33
34 _root : {
35 value : null
36 },
37 root : {
38 get: function() {
39 return this._root;
40 },
41 set: function(value) {
42 this._root = value;
43
44 this.initArrayControllers();
45 }
46 },
47
48 rootController: {
49 value: null
50 },
51
52 initArrayControllers : {
53 value: function() {
54 var self = this;
55
56 ///// Recursive function that finds all branch nodes and initializes
57 ///// sets the tree node type to "branch" or "leaf"
58
59 function walk(node, init, depth) {
60 var branch = node[self.branchKey];
61
62 if(branch) {
63 branch.forEach(function(node) {
64 walk(node, init, ++depth);
65 });
66
67 node['treeNodeType'] = 'branch';
68 } else {
69 node['treeNodeType'] = 'leaf';
70 }
71 }
72
73 walk(this._root, 0);
74
75 }
76 },
77
78 /**
79 @private
80 */
81 _selectedIndexes: {
82 value: null,
83 enumerable: false
84 },
85
86 /**
87 Description TODO
88 @type {Function}
89 @default null
90 */
91 selectedIndexes: {
92 get: function() {
93
94 },
95 set: function(value) {
96
97 }
98 },
99
100 branchControllers: {
101 value: []
102 },
103
104 addBranchController : {
105 value: function(controller) {
106 if(this.delegate) {
107 controller.delegate = this.delegate;
108 }
109
110 this.branchControllers.push(controller);
111 }
112 },
113
114 /**
115 @private
116 */
117 _content: {
118 enumerable: false,
119 value: null
120 },
121 /**
122 The content managed by the TreeController.
123 @type {Function}
124 @default {String} null
125 */
126 content: {
127 get: function() {
128 return this._cont