aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/components/layout/tools-list.reel/tools-list.js1
-rwxr-xr-xjs/components/ui/color-chip.reel/color-chip.js2
-rwxr-xr-xjs/components/ui/input-group.reel/input-group.css15
-rwxr-xr-xjs/controllers/elements/component-controller.js2
-rwxr-xr-xjs/controllers/elements/element-controller.js59
-rwxr-xr-xjs/controllers/elements/shapes-controller.js1
-rwxr-xr-xjs/controllers/elements/stage-controller.js16
-rwxr-xr-xjs/controllers/styles-controller.js66
-rwxr-xr-xjs/document/templates/montage-html/default_html.css5
-rwxr-xr-xjs/document/templates/montage-html/index.html2
-rwxr-xr-xjs/helper-classes/3D/view-utils.js48
-rwxr-xr-xjs/lib/NJUtils.js8
-rwxr-xr-xjs/mediators/element-mediator.js6
-rwxr-xr-xjs/models/properties-3d.js50
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.css46
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.html2
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.js2
-rwxr-xr-xjs/panels/properties.reel/properties.js24
-rwxr-xr-xjs/panels/properties.reel/sections/three-d-view.reel/three-d-view.html28
-rwxr-xr-xjs/panels/properties.reel/sections/three-d-view.reel/three-d-view.js14
-rwxr-xr-xjs/stage/layout.js2
-rwxr-xr-xjs/stage/stage.reel/stage.js5
-rw-r--r--js/tools/BrushTool.js2
-rwxr-xr-xjs/tools/LineTool.js2
-rwxr-xr-xjs/tools/PenTool.js2
-rwxr-xr-xjs/tools/RotateObject3DTool.js1
-rwxr-xr-xjs/tools/RotateStage3DTool.js5
-rwxr-xr-xjs/tools/SelectionTool.js61
-rwxr-xr-xjs/tools/ShapeTool.js5
-rwxr-xr-xjs/tools/TagTool.js19
-rwxr-xr-xjs/tools/Translate3DToolBase.js7
-rwxr-xr-xjs/tools/TranslateObject3DTool.js12
-rwxr-xr-xjs/tools/drawing-tool-base.js2
33 files changed, 318 insertions, 204 deletions
diff --git a/js/components/layout/tools-list.reel/tools-list.js b/js/components/layout/tools-list.reel/tools-list.js
index 5ea6f70f..d68e8a56 100755
--- a/js/components/layout/tools-list.reel/tools-list.js
+++ b/js/components/layout/tools-list.reel/tools-list.js
@@ -56,6 +56,7 @@ exports.ToolsList = Montage.create(Component, {
56 this.SubselectionTool.options = this.application.ninja.toolsProperties.subSelectionProperties; 56 this.SubselectionTool.options = this.application.ninja.toolsProperties.subSelectionProperties;
57 57
58 this.Rotate3DTool.options = this.application.ninja.toolsProperties.rotate3DProperties; 58 this.Rotate3DTool.options = this.application.ninja.toolsProperties.rotate3DProperties;
59 this.Translate3DTool.options = this.application.ninja.toolsProperties.rotate3DProperties;
59 this.TagTool.options = this.application.ninja.toolsProperties.tagProperties; 60 this.TagTool.options = this.application.ninja.toolsProperties.tagProperties;
60 this.PenTool.options = this.application.ninja.toolsProperties.penProperties; 61 this.PenTool.options = this.application.ninja.toolsProperties.penProperties;
61 this.TextTool.options = this.application.ninja.toolsProperties.textProperties; 62 this.TextTool.options = this.application.ninja.toolsProperties.textProperties;
diff --git a/js/components/ui/color-chip.reel/color-chip.js b/js/components/ui/color-chip.reel/color-chip.js
index 7a7411da..4e64b2e8 100755
--- a/js/components/ui/color-chip.reel/color-chip.js
+++ b/js/components/ui/color-chip.reel/color-chip.js
@@ -56,6 +56,8 @@ var ColorChip = exports.ColorChip = Montage.create(Component, {
56 if(this.hasIcon) { 56 if(this.hasIcon) {
57 var icon = this.iconType || this.mode + "Icon"; 57 var icon = this.iconType || this.mode + "Icon";
58 this.application.ninja.colorController.addButton(icon, this.icon); 58 this.application.ninja.colorController.addButton(icon, this.icon);
59 } else {
60 this.icon.style.display = "none";
59 } 61 }
60 62
61 this.chipBtn.props = {side: 'right', align: 'top', wheel: true, palette: true, gradient: true, image: true, offset: this.offset}; 63 this.chipBtn.props = {side: 'right', align: 'top', wheel: true, palette: true, gradient: true, image: true, offset: this.offset};
diff --git a/js/components/ui/input-group.reel/input-group.css b/js/components/ui/input-group.reel/input-group.css
index 0b7cd1ef..5707b17e 100755
--- a/js/components/ui/input-group.reel/input-group.css
+++ b/js/components/ui/input-group.reel/input-group.css
@@ -23,11 +23,24 @@
23 23
24.propControl .inputRow div .hottext, 24.propControl .inputRow div .hottext,
25.propControl .inputRow div .hottextInput, 25.propControl .inputRow div .hottextInput,
26.prop-controller .nj-skinned 26.prop-controller .nj-skinned,
27.prop-controller .hottext,
28.prop-controller .hottextInput
27{ 29{
28 border: 1px solid black; 30 border: 1px solid black;
29 width: 30px !important; 31 width: 30px !important;
30 float:left; 32 float:left;
31 margin: 2px 0; 33 margin: 2px 0;
32 text-align: center; 34 text-align: center;
35}
36
37.prop-controller .file-path
38{
39 width: 170px !important;
40}
41
42.propControl .inputRow div.propControl
43{
44 float:left;
45 margin: 2px 0;
33} \ No newline at end of file 46} \ No newline at end of file
diff --git a/js/controllers/elements/component-controller.js b/js/controllers/elements/component-controller.js
index 260ee8a0..d902e4a1 100755
--- a/js/controllers/elements/component-controller.js
+++ b/js/controllers/elements/component-controller.js
@@ -16,6 +16,7 @@ exports.ComponentController = Montage.create(ElementController, {
16 switch(prop) { 16 switch(prop) {
17 case "id": 17 case "id":
18 case "class": 18 case "class":
19 case "-webkit-transform-style":
19 case "left": 20 case "left":
20 case "top": 21 case "top":
21 case "width": 22 case "width":
@@ -38,6 +39,7 @@ exports.ComponentController = Montage.create(ElementController, {
38 switch(p) { 39 switch(p) {
39 case "id": 40 case "id":
40 case "class": 41 case "class":
42 case "-webkit-transform-style":
41 case "left": 43 case "left":
42 case "top": 44 case "top":
43 case "width": 45 case "width":
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js
index efb33292..fda3a3c5 100755
--- a/js/controllers/elements/element-controller.js
+++ b/js/controllers/elements/element-controller.js
@@ -228,11 +228,10 @@ exports.ElementController = Montage.create(Component, {
228 228
229 if (el) 229 if (el)
230 { 230 {
231 var xformStr = this.application.ninja.elementMediator.getProperty(el, "-webkit-transform"); 231 mat = this.application.ninja.stylesController.getMatrixFromElement(el, false);
232 if (xformStr) 232 if (!mat) {
233 mat = this.transformStringToMat( xformStr );
234 if (!mat)
235 mat = Matrix.I(4); 233 mat = Matrix.I(4);
234 }
236 } 235 }
237 236
238 el.elementModel.props3D.matrix3d = mat; 237 el.elementModel.props3D.matrix3d = mat;
@@ -249,23 +248,9 @@ exports.ElementController = Montage.create(Component, {
249 } 248 }
250 else 249 else
251 { 250 {
252 var dist = 1400; 251 var dist = this.application.ninja.stylesController.getPerspectiveDistFromElement(el, false);
253 252 if(dist == null) {
254 var str = this.getProperty(el, "-webkit-transform"); 253 dist = 1400;
255 if (str)
256 {
257 var index1 = str.indexOf( "perspective(");
258 if (index1 >= 0)
259 {
260 index1 += 12; // do not include 'perspective('
261 var index2 = str.indexOf( ")", index1 );
262 if (index2 >= 0)
263 {
264 var substr = str.substr( index1, (index2-index1));
265 if (substr && (substr.length > 0))
266 dist = MathUtils.styleToNumber( substr );
267 }
268 }
269 } 254 }
270 255
271 el.elementModel.props3D.perspectiveDist = dist; 256 el.elementModel.props3D.perspectiveDist = dist;
@@ -308,36 +293,6 @@ exports.ElementController = Montage.create(Component, {
308 elt.elementModel.props3D.z3D = ~~(elt3DInfo.translation[2]); 293 elt.elementModel.props3D.z3D = ~~(elt3DInfo.translation[2]);
309 } 294 }
310 } 295 }
311 },
312
313 transformStringToMat: {
314 value: function( str ) {
315 var rtnMat;
316
317 var index1 = str.indexOf( "matrix3d(");
318 if (index1 >= 0)
319 {
320 index1 += 9; // do not include 'matrix3d('
321 var index2 = str.indexOf( ")", index1 );
322 if (index2 >= 0)
323 {
324 var substr = str.substr( index1, (index2-index1));
325 if (substr && (substr.length > 0))
326 {
327 var numArray = substr.split(',');
328 var nNums = numArray.length;
329 if (nNums == 16)
330 {
331 // gl-matrix wants row order
332 rtnMat = numArray;
333 for (var i=0; i<16; i++)
334 rtnMat[i] = Number( rtnMat[i] );
335 }
336 }
337 }
338 }
339