aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers')
-rwxr-xr-xjs/controllers/color-controller.js8
-rwxr-xr-xjs/controllers/document-controller.js4
-rwxr-xr-xjs/controllers/elements/element-controller.js8
-rwxr-xr-xjs/controllers/elements/shapes-controller.js2
-rw-r--r--js/controllers/objects-controller.js6
-rwxr-xr-xjs/controllers/styles-controller.js276
-rwxr-xr-xjs/controllers/undo-controller.js2
7 files changed, 153 insertions, 153 deletions
diff --git a/js/controllers/color-controller.js b/js/controllers/color-controller.js
index 194b7153..8be2421f 100755
--- a/js/controllers/color-controller.js
+++ b/js/controllers/color-controller.js
@@ -27,7 +27,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27ARISING 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
31//////////////////////////////////////////////////////////////////////// 31////////////////////////////////////////////////////////////////////////
32// 32//
33var Montage = require("montage/core/core").Montage, 33var Montage = require("montage/core/core").Montage,
@@ -163,7 +163,7 @@ exports.ColorController = Montage.create(Component, {
163 // 163 //
164 getBorder: { 164 getBorder: {
165 value: function (element) { 165 value: function (element) {
166 166
167 } 167 }
168 }, 168 },
169 //////////////////////////////////////////////////////////////////// 169 ////////////////////////////////////////////////////////////////////
@@ -262,14 +262,14 @@ exports.ColorController = Montage.create(Component, {
262 c = this.parseCssToColor('rgb('+temp[0]+')'); 262 c = this.parseCssToColor('rgb('+temp[0]+')');
263 gradient.stops.push({css: c.css, value: c.value, mode: c.mode, position: parseInt(temp[1].replace(/\%/i, ""))}); 263 gradient.stops.push({css: c.css, value: c.value, mode: c.mode, position: parseInt(temp[1].replace(/\%/i, ""))});
264 } else if (css.indexOf('rgba') >= 0) { 264 } else if (css.indexOf('rgba') >= 0) {
265 265
266 temp = arr[j].split('rgba'); 266 temp = arr[j].split('rgba');
267 temp = temp[1].replace(/\(/i, ""); 267 temp = temp[1].replace(/\(/i, "");
268 temp = temp.split(')'); 268 temp = temp.split(')');
269 c = this.parseCssToColor('rgba('+temp[0]+')'); 269 c = this.parseCssToColor('rgba('+temp[0]+')');
270 gradient.stops.push({css: c.css, value: c.value, mode: c.mode, position: parseInt(temp[1].replace(/\%/i, ""))}); 270 gradient.stops.push({css: c.css, value: c.value, mode: c.mode, position: parseInt(temp[1].replace(/\%/i, ""))});
271 } 271 }
272 } 272 }
273 } else if (css.indexOf('-webkit-gradient') >= 0) { 273 } else if (css.indexOf('-webkit-gradient') >= 0) {
274 //Linear gradient 274 //Linear gradient
275 gradient.stops = []; 275 gradient.stops = [];
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index 1857dfd7..bab2ed0e 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -246,7 +246,7 @@ exports.DocumentController = Montage.create(Component, {
246 } 246 }
247 }, 247 },
248 //////////////////////////////////////////////////////////////////// 248 ////////////////////////////////////////////////////////////////////
249 249
250 /** 250 /**
251 * Public method 251 * Public method
252 * doc contains: 252 * doc contains:
@@ -361,7 +361,7 @@ exports.DocumentController = Montage.create(Component, {
361 } 361 }
362 }, 362 },
363 //////////////////////////////////////////////////////////////////// 363 ////////////////////////////////////////////////////////////////////
364 364
365 openProjectWithURI: { 365 openProjectWithURI: {
366 value: function(uri) { 366 value: function(uri) {
367 console.log("URI is: ", uri); 367 console.log("URI is: ", uri);
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js
index 646fa455..59ac238c 100755
--- a/js/controllers/elements/element-controller.js
+++ b/js/controllers/elements/element-controller.js
@@ -36,9 +36,9 @@ exports.ElementController = Montage.create(Component, {
36 36
37 addElement: { 37 addElement: {
38 value: function(el, styles) { 38 value: function(el, styles) {
39 39
40 if (el.getAttribute) el.setAttribute('data-ninja-node', 'true'); 40 if (el.getAttribute) el.setAttribute('data-ninja-node', 'true');
41 41
42 // Updated to use new methods in TimelinePanel. JR. 42 // Updated to use new methods in TimelinePanel. JR.
43 var insertionIndex = this.application.ninja.timeline.getInsertionIndex(); 43 var insertionIndex = this.application.ninja.timeline.getInsertionIndex();
44 if (insertionIndex === false) { 44 if (insertionIndex === false) {
@@ -51,7 +51,7 @@ exports.ElementController = Montage.create(Component, {
51 element.parentNode.insertBefore(el, element.nextSibling); 51 element.parentNode.insertBefore(el, element.nextSibling);
52 } 52 }
53 } 53 }
54 54
55 if(styles) { 55 if(styles) {
56 this.application.ninja.stylesController.setElementStyles(el, styles); 56 this.application.ninja.stylesController.setElementStyles(el, styles);
57 } 57 }
@@ -67,7 +67,7 @@ exports.ElementController = Montage.create(Component, {
67 el.parentNode.removeChild(el); 67 el.parentNode.removeChild(el);
68 } 68 }
69 }, 69 },
70 70
71 getProperty: { 71 getProperty: {
72 value: function(el, prop, fallbackOnComputed, isStageElement) { 72 value: function(el, prop, fallbackOnComputed, isStageElement) {
73 if(el.nodeType !== 3){ 73 if(el.nodeType !== 3){
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js
index bef315ba..e6774858 100755
--- a/js/controllers/elements/shapes-controller.js
+++ b/js/controllers/elements/shapes-controller.js
@@ -300,7 +300,7 @@ exports.ShapesController = Montage.create(CanvasController, {
300 return null; 300 return null;
301 } 301 }
302 break; 302 break;
303 303
304 304
305 case "strokeMaterial": 305 case "strokeMaterial":
306 var sm = el.elementModel.shapeModel.GLGeomObj.getStrokeMaterial(); 306 var sm = el.elementModel.shapeModel.GLGeomObj.getStrokeMaterial();
diff --git a/js/controllers/objects-controller.js b/js/controllers/objects-controller.js
index 0462df98..32eecf20 100644
--- a/js/controllers/objects-controller.js
+++ b/js/controllers/objects-controller.js
@@ -73,11 +73,11 @@ var objectsController = exports.ObjectsController = Montage.create(Montage, {
73 } 73 }
74 } 74 }
75 }, 75 },
76 76
77 /* -------------------------- 77 /* --------------------------
78 Binding Methods 78 Binding Methods
79 ----------------------------- */ 79 ----------------------------- */
80 80
81 addBinding : { 81 addBinding : {
82 value: function(bindingArgs) { 82 value: function(bindingArgs) {
83 if(!bindingArgs.sourceObject || !bindingArgs.sourceObjectPropertyPath || !bindingArgs) { return; } 83 if(!bindingArgs.sourceObject || !bindingArgs.sourceObjectPropertyPath || !bindingArgs) { return; }
@@ -122,7 +122,7 @@ var objectsController = exports.ObjectsController = Montage.create(Montage, {
122 122
123 } 123 }
124 }, 124 },
125 125
126 getObjectBindings : { 126 getObjectBindings : {
127 value: function(object) { 127 value: function(object) {
128 var descriptors = object._bindingDescriptors, 128 var descriptors = object._bindingDescriptors,
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js
index 1030acb4..973c3aa1 100755
--- a/js/controllers/styles-controller.js
+++ b/js/controllers/styles-controller.js
@@ -59,26 +59,26 @@ Methods:
59 - Delete stylesheets 59 - Delete stylesheets
60 - Enable stylesheets 60 - Enable stylesheets
61 - Disable stylesheets 61 - Disable stylesheets
62 62
63 use case : set background color 63 use case : set background color
64 - needs to know most specific rule WITH that property 64 - needs to know most specific rule WITH that property
65 - 65 -
66 66
67*/ 67*/
68 68
69var stylesController = exports.StylesController = Montage.create(Component, { 69var stylesController = exports.StylesController = Montage.create(Component, {
70 70
71 ///// Initialize after the active document has been set, and 71 ///// Initialize after the active document has been set, and
72 ///// bind the document to prop w/ setter. The setter calls to find 72 ///// bind the document to prop w/ setter. The setter calls to find
73 ///// the stage and default css files. 73 ///// the stage and default css files.
74 74
75 ///// Active document gets automatically set when the 75 ///// Active document gets automatically set when the
76 ///// document controller changes it 76 ///// document controller changes it
77 _currentDocument : { 77 _currentDocument : {
78 value : null, 78 value : null,
79 enumerable : false 79 enumerable : false
80 }, 80 },
81 81
82 currentDocument : { 82 currentDocument : {
83 get : function() { 83 get : function() {
84 return this._currentDocument; 84 return this._currentDocument;
@@ -97,7 +97,7 @@ var stylesController = exports.StylesController = Montage.create(Component, {
97 97
98 ///// setting document via binding 98 ///// setting document via binding
99 this._currentDocument = document; 99 this._currentDocument = document;
100 100
101 ///// Stage stylesheet should always be found 101 ///// Stage stylesheet should always be found
102 this._stageStylesheet = this.getSheetFromElement(this.CONST.STAGE_SHEET_ID); 102 this._stageStylesheet = this.getSheetFromElement(this.CONST.STAGE_SHEET_ID);
103 // Returns null if sheet not found (as in non-ninja projects) 103 // Returns null if sheet not found (as in non-ninja projects)
@@ -191,29 +191,29 @@ var stylesController = exports.StylesController = Montage.create(Component, {
191 } 191 }
192 }, 192 },
193 /* ----------------- Rule methods ----------------- */ 193 /* ----------------- Rule methods ----------------- */
194 194
195 ///// Add Rule 195 ///// Add Rule
196 ///// Passed in rule will be appended to the default stylesheet 196 ///// Passed in rule will be appended to the default stylesheet
197 ///// The rule can be in the form of a string (one argument), or 197 ///// The rule can be in the form of a string (one argument), or