aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Duran2012-02-08 22:00:51 -0800
committerJonathan Duran2012-02-08 22:00:51 -0800
commitfc7638f3921595f9a0cb0bd1687caf5451a7dd4d (patch)
tree4f2e60cd60b5ff73383924c52d605116278197e0
parentc84c9c97b4aa8f6b6d8e18b628e083c66ae3eb6b (diff)
downloadninja-fc7638f3921595f9a0cb0bd1687caf5451a7dd4d.tar.gz
Squashed commit of the following:
commit 35ad4d6d2fac4432046141c63c0209cf3d00be5c Merge: 76377d5 88e80d5 Author: Valerio Virgillito <valerio@motorola.com> Date: Wed Feb 8 20:40:50 2012 -0800 Merge pull request #24 from mencio/pi_bugs Pi bugs commit 88e80d512bdd125e6d604541c291f699bf5df564 Author: Valerio Virgillito <valerio@motorola.com> Date: Wed Feb 8 17:49:02 2012 -0800 Correcting the PI lock for height which had a bug in the original pull request. Signed-off-by: Valerio Virgillito <valerio@motorola.com> commit 76377d5378c7c23fd3c267fcab91aba39b30c555 Author: Valerio Virgillito <valerio@motorola.com> Date: Wed Feb 8 17:24:46 2012 -0800 Updating the sass file. Signed-off-by: Valerio Virgillito <valerio@motorola.com> commit 4ecdc52d3beb3224048726a373d454e1607ba10b Merge: 0537f8f 3a8dc41 Author: Valerio Virgillito <valerio@motorola.com> Date: Wed Feb 8 17:20:36 2012 -0800 Merge pull request #27 from ericguzman/TreeComponents Tree Components - css fixes commit 3a8dc4195a166478695bb286493f83258a4be49b Author: Eric Guzman <ericg@motorola.com> Date: Wed Feb 8 16:55:10 2012 -0800 Tree Components - css fixes commit 0537f8f29e7b8dd48fd08f20b1533fbe92a54c4b Merge: ab12be4 b6bc8b0 Author: mayhewinator <jcmayhew@gmail.com> Date: Wed Feb 8 14:46:17 2012 -0800 Merge pull request #25 from mayhewinator/WorkingBranch Adding assets required to be a packaged chrome app commit b6bc8b0bb91382991e6e43ad341304c813124882 Merge: c7b5edf ab12be4 Author: John Mayhew <vpn847@motorola.com> Date: Wed Feb 8 14:39:16 2012 -0800 Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into WorkingBranch commit c7b5edf0351d678d26b17eb5e2f995a140e209bb Author: John Mayhew <vpn847@motorola.com> Date: Wed Feb 8 14:38:25 2012 -0800 Added manifest.json, and image file required for being a packaged chrome application. Removed the old versions.json and updated the main page to detect if it is running as a chrome app and retrieve the version info from the chrome.app object. If the app is running hosted, the code will use an XHR to load the manifest.json and retrieve the version number from it directly. commit 26c470085263ab40a30fc8095bfe3763df5be981 Merge: cd997c1 ab12be4 Author: Valerio Virgillito <valerio@motorola.com> Date: Wed Feb 8 14:34:01 2012 -0800 Merge branch 'refs/heads/master' into pi_bugs commit cd997c18bdb346ff44919880239e705df80079ea Author: Valerio Virgillito <valerio@motorola.com> Date: Wed Feb 8 14:30:56 2012 -0800 Fix for the PI Lock button. Fixing the following JIRA bugs: 111 Signed-off-by: Valerio Virgillito <valerio@motorola.com> commit ab12be4e9a0d9fee4450795077b0107983b5682e Merge: 10cdeb5 2e58595 Author: Valerio Virgillito <valerio@motorola.com> Date: Wed Feb 8 14:03:36 2012 -0800 Merge pull request #23 from joseeight/SCSS Changing _scss folder to scss commit 2e58595d5c58ad9937bfc4f85ba8894970d4719f Author: Jose Antonio Marquez <kgq387@motorola.com> Date: Wed Feb 8 13:56:54 2012 -0800 adding new scss folder commit 7afa8f3fb2f2cede0b227a00ccc2b84267278db6 Author: Jose Antonio Marquez <kgq387@motorola.com> Date: Wed Feb 8 13:54:42 2012 -0800 delete _scss directory commit 10cdeb52403f16d5d4be43a516e8cdfbc866a2a2 Merge: 24f9717 9a404b8 Author: Valerio Virgillito <valerio@motorola.com> Date: Wed Feb 8 11:33:42 2012 -0800 Merge pull request #21 from mencio/pi_bugs Pi bugs fixes for 964, 616, 1084 commit 24f9717f2714f0497382436c4602736283247cf1 Merge: 763910b 9154cff Author: Valerio Virgillito <valerio@motorola.com> Date: Wed Feb 8 11:33:22 2012 -0800 Merge pull request #22 from ericguzman/StylesControllerUpdates Styles Controller - Added array of dirty stylesheets and event dispatch ... commit 9154cff2ce10aae54d9a7bd37a9d8b5578b0e297 Author: Eric Guzman <ericg@motorola.com> Date: Wed Feb 8 10:39:17 2012 -0800 Styles Controller - Added array of dirty stylesheets and event dispatch when a sheet is dirtied. commit 763910b9d074137eb7dee80447b89407ce5750c9 Merge: e557937 329a859 Author: Valerio Virgillito <valerio@motorola.com> Date: Wed Feb 8 10:18:36 2012 -0800 Merge pull request #20 from mqg734/ToolFixes Hooked up materials code to go through the ShapesController and updated the PI to reflect the currently selected shape's materials. Also fixed the following bugs: commit e5579374ff39b80b8c0c69faba37f6f581758fe0 Author: Valerio Virgillito <valerio@motorola.com> Date: Tue Feb 7 13:28:17 2012 -0800 updated montage v.0.6 to the latest changes. Signed-off-by: Valerio Virgillito <valerio@motorola.com> commit 9a404b8a717d0aac0eabb828a4d3cdc8c9c3eed8 Author: Valerio Virgillito <valerio@motorola.com> Date: Tue Feb 7 17:42:04 2012 -0800 IKNINJA - 1084: Fixing the custom tag. Signed-off-by: Valerio Virgillito <valerio@motorola.com> commit a930295dfebd7fe7b4db5324b2048e6e7366c6d8 Author: Valerio Virgillito <valerio@motorola.com> Date: Tue Feb 7 16:12:23 2012 -0800 IKNINJA-616 - Drag and drop images fix for the PI and source Signed-off-by: Valerio Virgillito <valerio@motorola.com> commit 329a859e2666716c3a1d99c6bd2679e10c81fc8d Author: Nivesh Rajbhandari <mqg734@motorola.com> Date: Tue Feb 7 15:25:11 2012 -0800 Added ability to toggle combobox's visibility so we can show/hide materials comboboxes in the tool options. Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com> commit 65145cebdf4cde2767cbd0489ddcea5863c2ca9e Author: Valerio Virgillito <valerio@motorola.com> Date: Tue Feb 7 14:53:46 2012 -0800 IKNINJA-964 - Fixed inconsistent element name in PI/CSS panel. Signed-off-by: Valerio Virgillito <valerio@motorola.com> commit 668510892537eaaeb2e11520831d87b44b2489b7 Merge: 8950b34 c066fb4 Author: Valerio Virgillito <valerio@motorola.com> Date: Tue Feb 7 14:19:22 2012 -0800 Merge pull request #19 from ericguzman/TreeComponents Tree Components - Added copyright comments commit aec849d91e4b697d496b9ede28b5d89cf2283781 Author: Nivesh Rajbhandari <mqg734@motorola.com> Date: Tue Feb 7 14:18:13 2012 -0800 id's must start with a letter, so our workaround for using uuid for RDGE canvas id's won't work because they often start with a number. Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com> commit e8e21367e59bb521801fe2e843f42ad5bca5ea9f Author: Nivesh Rajbhandari <mqg734@motorola.com> Date: Tue Feb 7 13:52:54 2012 -0800 Fixing some typos and undeclared variables in GLRectangle and ShapesController. Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com> commit c066fb41ebee85bacf9b2155366b16831af41d76 Author: Eric Guzman <ericg@motorola.com> Date: Tue Feb 7 13:46:05 2012 -0800 Tree Components - Added copyright comments commit 3a8875c288049b466bfeb8b7f0510fd8cbfb970d Author: Nivesh Rajbhandari <mqg734@motorola.com> Date: Tue Feb 7 13:30:08 2012 -0800 Supporting switching materials in the PI. Also, moved makeFillMaterial and makeStrokeMaterial functions into GLGeomObj so shapes other than GLRectangle can use these routines. Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com> commit 8ad767b61460984a4031ba630f76ac8247a61857 Author: Nivesh Rajbhandari <mqg734@motorola.com> Date: Tue Feb 7 11:42:10 2012 -0800 Fixed PI to support WebGL materials. Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com> commit 486842239c71e7964f38a09aacda4970f2a82e1a Author: Nivesh Rajbhandari <mqg734@motorola.com> Date: Tue Feb 7 10:58:14 2012 -0800 Updated tools and PI to get/set materials by binding to appModel's materials property. This requires us to add FlatMaterial to the list of materials in the MaterialsLibrary. Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com> commit 789eaf5a92c903f27462c69a8890fbec695ab14e Merge: 92ae17b 8950b34 Author: Nivesh Rajbhandari <mqg734@motorola.com> Date: Tue Feb 7 09:36:29 2012 -0800 Merge branch 'refs/heads/ninja-internal' into ToolFixes commit 92ae17bc800cf82cdbd1482ef1af1a5fd7bd632a Author: Nivesh Rajbhandari <mqg734@motorola.com> Date: Mon Feb 6 16:35:12 2012 -0800 Force layout canvas and SelectionController to update their info when a 2d canvas is replaced by a 3d canvas (and vice-versa). Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com> commit 75486be2839494c9b54833aff8f5eef3f9542151 Author: Nivesh Rajbhandari <mqg734@motorola.com> Date: Mon Feb 6 15:41:48 2012 -0800 Support toggling between 2d and 3d canvas context. This requires us to create a new canvas with all the same values as the canvas being replaced and copying over all the shape data. Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com> commit f94b0c5ada403379b3ff8a900c2a2aabcecce49e Author: Nivesh Rajbhandari <mqg734@motorola.com> Date: Mon Feb 6 14:03:40 2012 -0800 Add enabled property for ComboBox to support enabling/disabling materials dropdowns in the PI. Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com> commit 5737864d1d55d96e3cc3c1bc9b38ec58303b3981 Author: Nivesh Rajbhandari <mqg734@motorola.com> Date: Mon Feb 6 13:35:30 2012 -0800 Allow users to switch between 2d and webGL mode. Note that this doesn't currently work. Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com> commit 486d9a31a85dd833a1c798049a00403756703034 Author: Nivesh Rajbhandari <mqg734@motorola.com> Date: Mon Feb 6 11:35:49 2012 -0800 Support use WebGL checkbox in the PI. Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com> Signed-off-by: Jonathan Duran <jduran@motorola.com>
-rw-r--r--css/ninja.css2
-rw-r--r--js/components/treeview/ninja-branch.reel/ninja-branch.css11
-rw-r--r--js/components/treeview/ninja-leaf.reel/ninja-leaf.css2
-rw-r--r--js/components/treeview/treeview.reel/treeview.html2
-rw-r--r--js/panels/properties/sections/position-and-size.reel/position-and-size.js89
-rw-r--r--scss/imports/scss/_PanelUI.scss2
6 files changed, 86 insertions, 22 deletions
diff --git a/css/ninja.css b/css/ninja.css
index 6a503373..5a25cc84 100644
--- a/css/ninja.css
+++ b/css/ninja.css
@@ -408,7 +408,7 @@ span.pp-span-all:focus { -webkit-box-shadow: none; background-color: #b4b4b4; bo
408 408
409#pp-container-list li, #pp-container-list span.span-space { background-repeat: no-repeat; } 409#pp-container-list li, #pp-container-list span.span-space { background-repeat: no-repeat; }
410 410
411#pp-container-list li.directory.open > span.pp-span-all > span.pp-col-files > span.span-space { background-image: url("../images/panels/project-panel/icon-file-folderopen.png"); background-position: 100% 0px; } 411#pp-container-list li.directory.open > span.pp-span-all > span.pp-col-files > span.span-space, .branch-label { background-image: url("../images/panels/project-panel/icon-file-folderopen.png"); background-position: 100% 0px; }
412 412
413#pp-container-list li.directory.closed > span.pp-span-all > span.pp-col-files > span.span-space { background-image: url("../images/panels/project-panel/icon-file-folderclosed.png"); background-position: 100% 0px; } 413#pp-container-list li.directory.closed > span.pp-span-all > span.pp-col-files > span.span-space { background-image: url("../images/panels/project-panel/icon-file-folderclosed.png"); background-position: 100% 0px; }
414 414
diff --git a/js/components/treeview/ninja-branch.reel/ninja-branch.css b/js/components/treeview/ninja-branch.reel/ninja-branch.css
index 6a458cc7..d8c212e8 100644
--- a/js/components/treeview/ninja-branch.reel/ninja-branch.css
+++ b/js/components/treeview/ninja-branch.reel/ninja-branch.css
@@ -18,14 +18,15 @@
18 width: 100%; 18 width: 100%;
19} 19}
20.treeRoot .branch .branch-label { 20.treeRoot .branch .branch-label {
21 border-bottom: 1px solid #505050;
22 cursor: pointer;
23 padding: 3px 0 4px;
24 background-repeat: no-repeat; 21 background-repeat: no-repeat;
25 background-position: 3px 2px; 22 background-position: 3px 2px;
26 box-shadow: 0 0 0 0 rgba(0,0,0,0); 23 border-bottom: 1px solid #505050;
27 font-weight: bold;
28 box-shadow: 0 3px 4px -4px rgba(0,0,0,0.2); 24 box-shadow: 0 3px 4px -4px rgba(0,0,0,0.2);
25 color: #FFF;
26 cursor: pointer;
27 font-weight: bold;
28 padding: 3px 0 4px;
29 text-shadow: 1px 1px 0 #000;
29} 30}
30 31
31/* First Level */ 32/* First Level */
diff --git a/js/components/treeview/ninja-leaf.reel/ninja-leaf.css b/js/components/treeview/ninja-leaf.reel/ninja-leaf.css
index b2f427b5..085b11e0 100644
--- a/js/components/treeview/ninja-leaf.reel/ninja-leaf.css
+++ b/js/components/treeview/ninja-leaf.reel/ninja-leaf.css
@@ -19,6 +19,8 @@
19/* Second level */ 19/* Second level */
20.branch .branch .leaf-label { 20.branch .branch .leaf-label {
21 background-position: 25px center; 21 background-position: 25px center;
22 box-shadow: 0 3px 4px -4px rgba(0,0,0,0.2);
23 color: #FFF;
22 padding-left: 45px; 24 padding-left: 45px;
23} 25}
24/* Third level */ 26/* Third level */
diff --git a/js/components/treeview/treeview.reel/treeview.html b/js/components/treeview/treeview.reel/treeview.html
index d70b016c..4f9e6a72 100644
--- a/js/components/treeview/treeview.reel/treeview.html
+++ b/js/components/treeview/treeview.reel/treeview.html
@@ -26,7 +26,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
26 "name" : "Branch" 26 "name" : "Branch"
27 }, 27 },
28 "defaultLeaf" : { 28 "defaultLeaf" : {
29 "module" : "js/components/treeview/presets-leaf.reel", 29 "module" : "js/components/treeview/leaf.reel",
30 "name" : "Leaf" 30 "name" : "Leaf"
31 }, 31 },
32 "scrollview": { 32 "scrollview": {
diff --git a/js/panels/properties/sections/position-and-size.reel/position-and-size.js b/js/panels/properties/sections/position-and-size.reel/position-and-size.js
index 43f08fcf..49117090 100644
--- a/js/panels/properties/sections/position-and-size.reel/position-and-size.js
+++ b/js/panels/properties/sections/position-and-size.reel/position-and-size.js
@@ -28,6 +28,14 @@ exports.PosSize = Montage.create(Component, {
28 value: null 28 value: null
29 }, 29 },
30 30
31 aspectRatioWidth: {
32 value: null
33 },
34
35 aspectRatioHeight: {
36 value: null
37 },
38
31 _disablePosition: { 39 _disablePosition: {
32 value: true 40 value: true
33 }, 41 },
@@ -62,9 +70,8 @@ exports.PosSize = Montage.create(Component, {
62 this.widthControl.addEventListener("change", this, false); 70 this.widthControl.addEventListener("change", this, false);
63 this.widthControl.addEventListener("changing", this, false); 71 this.widthControl.addEventListener("changing", this, false);
64 72
65 73 this.bindButton.identifier = "ratio";
66 //this._controlList[0].control.addEventListener("action", this._handleStageEvent.bind(this), false); 74 this.bindButton.addEventListener("action", this, false);
67 //PropertiesPanelModule.PropertiesPanelBase.PIControlList["stageWidthHeightLock"] = this._controlList[0].control;
68 75
69 } 76 }
70 }, 77 },
@@ -87,6 +94,25 @@ exports.PosSize = Montage.create(Component, {
87 } 94 }
88 }, 95 },
89 96
97 /**
98 * Calculate the current aspect ration when the bind button is pressed.
99 * If one of the values is 0, then use 1:1 as the ratio;
100 */
101 handleRatioAction: {
102 value: function() {
103 if(this.bindButton.value) {
104 this.aspectRatioWidth = this.heightControl.value / this.widthControl.value;
105 if(isNaN(this.aspectRatioWidth) || !isFinite(this.aspectRatioWidth) || this.aspectRatioWidth === 0) this.aspectRatioWidth = 1;
106
107 this.aspectRatioHeight = this.widthControl.value / this.heightControl.value;
108 if(isNaN(this.aspectRatioHeight) || !isFinite(this.aspectRatioHeight) || this.aspectRatioHeight === 0) this.aspectRatioHeight = 1;
109 } else {
110 this.aspectRatioWidth = 1;
111 this.aspectRatioHeight = 1;
112 }
113 }
114 },
115
90 handleLeftChange: { 116 handleLeftChange: {
91 value: function(event) { 117 value: function(event) {
92 var prevPosition; 118 var prevPosition;
@@ -121,6 +147,17 @@ exports.PosSize = Montage.create(Component, {
121 if(this.savedPosition) prevPosition = [this.savedPosition + "px"]; 147 if(this.savedPosition) prevPosition = [this.savedPosition + "px"];
122 148
123 this.application.ninja.selectedElements.length ? items = this.application.ninja.selectedElements : items = [this.application.ninja.currentDocument.documentRoot]; 149 this.application.ninja.selectedElements.length ? items = this.application.ninja.selectedElements : items = [this.application.ninja.currentDocument.documentRoot];
150
151 if(this.bindButton.value) {
152
153 var newWidth = Math.round(this.aspectRatioHeight * this.heightControl.value);
154
155 if(!isFinite(newWidth)) newWidth = this.heightControl.value;
156
157 this.widthControl.value = newWidth;
158 this.application.ninja.elementMediator.setProperty(items, "width", [newWidth + "px"] , "Change", "pi");
159 }
160
124 this.application.ninja.elementMediator.setProperty(items, "height", [this.heightControl.value + "px"] , "Change", "pi", prevPosition); 161 this.application.ninja.elementMediator.setProperty(items, "height", [this.heightControl.value + "px"] , "Change", "pi", prevPosition);
125 this.savedPosition = null; 162 this.savedPosition = null;
126 } 163 }
@@ -135,9 +172,23 @@ exports.PosSize = Montage.create(Component, {
135 if(this.savedPosition) prevPosition = [this.savedPosition + "px"]; 172 if(this.savedPosition) prevPosition = [this.savedPosition + "px"];
136 173
137 this.application.ninja.selectedElements.length ? items = this.application.ninja.selectedElements : items = [this.application.ninja.currentDocument.documentRoot]; 174 this.application.ninja.selectedElements.length ? items = this.application.ninja.selectedElements : items = [this.application.ninja.currentDocument.documentRoot];
175
176 if(this.bindButton.value) {
177
178 var newHeight = Math.round(this.aspectRatioWidth * this.widthControl.value);
179
180 if(!isFinite(newHeight)) newHeight = this.widthControl.value;
181
182 this.heightControl.va