aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcss/ninja.css14
-rwxr-xr-xjs/components/layout/bread-crumb.reel/bread-crumb.js42
-rwxr-xr-xjs/controllers/elements/element-controller.js4
-rwxr-xr-xjs/controllers/selection-controller.js38
-rwxr-xr-xjs/document/document-html.js6
-rwxr-xr-xjs/document/mediators/template.js4
-rwxr-xr-xjs/document/models/base.js3
-rwxr-xr-xjs/document/models/html.js5
-rwxr-xr-xjs/document/templates/banner/index.html23
-rwxr-xr-xjs/document/templates/html/index.html23
-rwxr-xr-xjs/helper-classes/3D/snap-manager.js6
-rwxr-xr-xjs/lib/NJUtils.js4
-rwxr-xr-xjs/ninja.reel/ninja.html3
-rwxr-xr-xjs/ninja.reel/ninja.js20
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js28
-rwxr-xr-xjs/stage/layout.js6
-rwxr-xr-xjs/stage/stage.reel/stage.js144
-rwxr-xr-xjs/tools/Rotate3DToolBase.js2
-rwxr-xr-xjs/tools/SelectionTool.js4
-rwxr-xr-xjs/tools/ShapeTool.js6
-rwxr-xr-xjs/tools/TranslateObject3DTool.js2
-rwxr-xr-xscss/imports/scss/_ScrollBars.scss26
22 files changed, 248 insertions, 165 deletions
diff --git a/css/ninja.css b/css/ninja.css
index ce27977b..e3d560ab 100755
--- a/css/ninja.css
+++ b/css/ninja.css
@@ -909,7 +909,7 @@ input[type="radio"]:disabled { opacity: .3; background: #282828; border-width: 1
909 909
910::-webkit-scrollbar-track:disabled { display: none; } 910::-webkit-scrollbar-track:disabled { display: none; }
911 911
912:-webkit-scrollbar-track:vertical:disabled { display: none; } 912::-webkit-scrollbar-track:vertical:disabled { display: none; }
913 913
914::-webkit-scrollbar-track:horizontal:disabled { display: none; } 914::-webkit-scrollbar-track:horizontal:disabled { display: none; }
915 915
@@ -919,18 +919,6 @@ input[type="radio"]:disabled { opacity: .3; background: #282828; border-width: 1
919 919
920::-webkit-scrollbar-corner:disabled { display: none; } 920::-webkit-scrollbar-corner:disabled { display: none; }
921 921
922#iframeContainer::-webkit-resizer:disabled { display: block; }
923
924#iframeContainer::-webkit-scrollbar-track:vertical:disabled { display: block; }
925
926#iframeContainer::-webkit-scrollbar-track:horizontal:disabled { display: block; }
927
928#iframeContainer::-webkit-scrollbar-track-piece:disabled { display: block; }
929
930#iframeContainer::-webkit-scrollbar-corner:disabled { display: block; }
931
932#iframeContainer::-webkit-resizer:disabled { display: block; }
933
934.tree { -webkit-user-select: none; cursor: default; float: left; padding-left: 0; color: white; } 922.tree { -webkit-user-select: none; cursor: default; float: left; padding-left: 0; color: white; }
935 923
936.tree li { -webkit-margin-before: 0px; -webkit-margin-after: 0px; list-style-type: none; } 924.tree li { -webkit-margin-before: 0px; -webkit-margin-after: 0px; list-style-type: none; }
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js
index ac131f2c..260922b3 100755
--- a/js/components/layout/bread-crumb.reel/bread-crumb.js
+++ b/js/components/layout/bread-crumb.reel/bread-crumb.js
@@ -51,22 +51,6 @@ exports.Breadcrumb = Montage.create(Component, {
51 } 51 }
52 }, 52 },
53 53
54 _container:{
55 value:null
56 },
57
58 container: {
59 set: function(value) {
60 if(this._container !== value) {
61 this._container = value;
62 this.createContainerElements();
63 }
64 },
65 get: function() {
66 return this._container;
67 }
68 },
69
70 containerElements: { 54 containerElements: {
71 value: [] 55 value: []
72 }, 56 },
@@ -74,31 +58,37 @@ exports.Breadcrumb = Montage.create(Component, {
74 prepareForDraw: { 58 prepareForDraw: {
75 value: function() { 59 value: function() {
76 this.breadcrumbBt.addEventListener("action", this, false); 60 this.breadcrumbBt.addEventListener("action", this, false);
61 this.addPropertyChangeListener("currentDocument.model.domContainer", this)
77 } 62 }
78 }, 63 },
79 64
80 createContainerElements: { 65 handleChange: {
81 value: function() { 66 value: function() {
82 var parentNode; 67 if(this.currentDocument && this.currentDocument.model.getProperty("domContainer")) {
68 this.createContainerElements(this.currentDocument.model.getProperty("domContainer"));
69 }
70 }
71 },
72
73 createContainerElements: {
74 value: function(container) {
83 75
84// delete this.containerElements; 76// delete this.containerElements;
85 this.containerElements = []; 77 this.containerElements = [];
86 78
87 parentNode = this.container; 79 while(container !== this.currentDocument.model.documentRoot) {
88 80 this.containerElements.unshift({"node": container, "nodeUuid":container.uuid, "label": container.nodeName});
89 while(parentNode !== this.currentDocument.model.documentRoot) { 81 container = container.parentNode;
90 this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName});
91 parentNode = parentNode.parentNode;
92 } 82 }
93 83
94 // This is always the top container which is now hardcoded to body 84 // This is always the top container which is now hardcoded to body
95 this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); 85 this.containerElements.unshift({"node": container, "nodeUuid":container.uuid, "label": container.nodeName});
96 } 86 }
97 }, 87 },
98 88
99 handleAction: { 89 handleAction: {
100 value: function(evt) { 90 value: function(evt) {
101 if(evt.target.value === this.container.uuid) { 91 if(evt.target.value === this.currentDocument.model.domContainer.uuid) {
102 return; 92 return;
103 } 93 }
104 94
@@ -109,7 +99,7 @@ exports.Breadcrumb = Montage.create(Component, {
109 } 99 }
110 100
111 // TODO: This is bound 2 ways, update the internal property 101 // TODO: This is bound 2 ways, update the internal property
112 this.application.ninja.currentSelectedContainer = this.containerElements[i].node; 102 this.currentDocument.model.domContainer = this.containerElements[i].node;
113 } 103 }
114 } 104 }
115}); 105});
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js
index 4a02e9a3..e40a646a 100755
--- a/js/controllers/elements/element-controller.js
+++ b/js/controllers/elements/element-controller.js
@@ -19,13 +19,13 @@ exports.ElementController = Montage.create(Component, {
19 var selectedLayerIndex = this.application.ninja.timeline.getLayerIndexByID(this.application.ninja.timeline.currentLayerSelected.layerData.layerID); 19 var selectedLayerIndex = this.application.ninja.timeline.getLayerIndexByID(this.application.ninja.timeline.currentLayerSelected.layerData.layerID);
20 20
21 if(selectedLayerIndex === 0) { 21 if(selectedLayerIndex === 0) {
22 this.application.ninja.currentSelectedContainer.appendChild(el); 22 this.application.ninja.currentDocument.model.domContainer.appendChild(el);
23 } else { 23 } else {
24 var element = this.application.ninja.timeline.arrLayers[selectedLayerIndex].layerData.elementsList[0]; 24 var element = this.application.ninja.timeline.arrLayers[selectedLayerIndex].layerData.elementsList[0];
25 element.parentNode.insertBefore(el, element.nextSibling); 25 element.parentNode.insertBefore(el, element.nextSibling);
26 } 26 }
27 } else { 27 } else {
28 this.application.ninja.currentSelectedContainer.appendChild(el); 28 this.application.ninja.currentDocument.model.domContainer.appendChild(el);
29 } 29 }
30 30
31 if(styles) { 31 if(styles) {
diff --git a/js/controllers/selection-controller.js b/js/controllers/selection-controller.js
index 4bca0755..9ae1cfc9 100755
--- a/js/controllers/selection-controller.js
+++ b/js/controllers/selection-controller.js
@@ -35,7 +35,7 @@ exports.SelectionController = Montage.create(Component, {
35 35
36 if(this._currentDocument && this._currentDocument.currentView === "design") { 36 if(this._currentDocument && this._currentDocument.currentView === "design") {
37 this._currentDocument.model._selection = this.application.ninja.selectedElements; 37 this._currentDocument.model._selection = this.application.ninja.selectedElements;
38 this._currentDocument.model.selectionContainer = this.application.ninja._currentSelectedContainer; 38// this._currentDocument.model.selectionContainer = this.application.ninja._currentSelectedContainer;
39 } 39 }
40 40
41 this._currentDocument = value; 41 this._currentDocument = value;
@@ -65,7 +65,7 @@ exports.SelectionController = Montage.create(Component, {
65 this._selectedElements = value; 65 this._selectedElements = value;
66 66
67 this.application.ninja.selectedElements = this._selectedElements; 67 this.application.ninja.selectedElements = this._selectedElements;
68 this.application.ninja._currentSelectedContainer = this._selectionContainer = this.application.ninja.currentDocument.model.documentRoot; 68// this.application.ninja._currentSelectedContainer = this._selectionContainer = this.application.ninja.currentDocument.model.documentRoot;
69 69
70 if(this._selectedElements.length === 0) { 70 if(this._selectedElements.length === 0) {
71 this.executeSelectElement(); 71 this.executeSelectElement();
@@ -78,30 +78,24 @@ exports.SelectionController = Montage.create(Component, {
78 } 78 }
79 }, 79 },
80 80
81 // Bound property to the ninja currentSelectedContainer
82 _selectionContainer: {
83 value: null
84 },
85
86 selectionContainer: {
87 get: function() {
88 return this._selectionContainer
89 },
90 set: function(value) {
91 if(this._selectionContainer && this._selectionContainer !== value) {