aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/components/layout/document-entry.reel/document-entry.js4
-rwxr-xr-xjs/components/layout/tool-button.reel/tool-button.html4
-rwxr-xr-xjs/components/layout/tool-button.reel/tool-button.js11
-rwxr-xr-xjs/components/layout/tools-list.reel/tools-list.html12
-rwxr-xr-xjs/components/radio.reel/radio.html9
-rwxr-xr-xjs/components/radio.reel/radio.js24
-rwxr-xr-xjs/components/ui/color-chip.reel/color-chip.js13
-rwxr-xr-xjs/components/ui/file-input.reel/file-input.js2
-rwxr-xr-xjs/components/ui/input-group.reel/input-group.html3
-rwxr-xr-xjs/components/ui/property-control.reel/property-control.js12
-rwxr-xr-xjs/controllers/document-controller.js95
-rwxr-xr-xjs/controllers/elements/body-controller.js2
-rwxr-xr-xjs/controllers/selection-controller.js4
-rwxr-xr-xjs/data/tools-data.js13
-rwxr-xr-xjs/document/document-html.js31
-rwxr-xr-xjs/document/html-document.js78
-rwxr-xr-xjs/document/models/base.js20
-rwxr-xr-xjs/document/models/html.js17
-rwxr-xr-xjs/document/views/design.js34
-rwxr-xr-xjs/helper-classes/3D/draw-utils.js4
-rwxr-xr-xjs/helper-classes/3D/snap-manager.js20
-rwxr-xr-xjs/helper-classes/3D/view-utils.js62
-rw-r--r--js/mediators/io-mediator.js79
-rwxr-xr-xjs/ninja.reel/ninja.js34
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.html2
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.js7
-rwxr-xr-xjs/panels/properties.reel/properties.css31
-rwxr-xr-xjs/panels/properties.reel/properties.js41
-rwxr-xr-xjs/panels/properties.reel/sections/custom-rows/dual-row.reel/dual-row.html10
-rwxr-xr-xjs/panels/properties.reel/sections/custom-rows/dual-row.reel/dual-row.js3
-rwxr-xr-xjs/stage/stage-deps.js73
-rwxr-xr-xjs/stage/stage-view.reel/stage-view.js22
-rwxr-xr-xjs/stage/stage.reel/stage.html3
-rwxr-xr-xjs/stage/stage.reel/stage.js77
-rwxr-xr-xjs/tools/drawing-tool-base.js39
35 files changed, 413 insertions, 482 deletions
diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js
index ad0236c6..50b3624c 100755
--- a/js/components/layout/document-entry.reel/document-entry.js
+++ b/js/components/layout/document-entry.reel/document-entry.js
@@ -121,8 +121,8 @@ exports.DocumentEntry = Montage.create(Component, {
121 if(event._event.target.nodeName === "IMG") { 121 if(event._event.target.nodeName === "IMG") {
122 this.application.ninja.documentController.closeFile(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); 122 this.application.ninja.documentController.closeFile(this.application.ninja.documentController._findDocumentByUUID(this._uuid));
123 } else { 123 } else {
124 if(!this._document.isActive) { 124 if(!this.active) {
125 this.application.ninja.stage.stageView.switchDocument(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); 125 this.application.ninja.documentController.switchDocuments(this.application.ninja.currentDocument, this.application.ninja.documentController._findDocumentByUUID(this._uuid));
126 } 126 }
127 } 127 }
128 } 128 }
diff --git a/js/components/layout/tool-button.reel/tool-button.html b/js/components/layout/tool-button.reel/tool-button.html
index 84a6d34e..a329f646 100755
--- a/js/components/layout/tool-button.reel/tool-button.html
+++ b/js/components/layout/tool-button.reel/tool-button.html
@@ -16,6 +16,10 @@
16 "prototype": "js/components/layout/tool-button.reel", 16 "prototype": "js/components/layout/tool-button.reel",
17 "properties": { 17 "properties": {
18 "element": {"#": "toolBarButton"} 18 "element": {"#": "toolBarButton"}
19 },
20 "bindings": {
21 "selected": {"<<->": "@owner.data.selected"},
22 "subselected": {"<-": "@owner.data.subtools.selected"}
19 } 23 }
20 } 24 }
21 } 25 }
diff --git a/js/components/layout/tool-button.reel/tool-button.js b/js/components/layout/tool-button.reel/tool-button.js
index 6cea0dc3..6008c4ec 100755
--- a/js/components/layout/tool-button.reel/tool-button.js
+++ b/js/components/layout/tool-button.reel/tool-button.js
@@ -48,19 +48,8 @@ exports.ToolButton = Montage.create(Component, {
48 this.element.addEventListener("mousedown", this, false); 48 this.element.addEventListener("mousedown", this, false);
49 this.element.addEventListener("dblclick", this, false); 49 this.element.addEventListener("dblclick", this, false);
50 50
51 Object.defineBinding(this, "selected", {
52 boundObject: this.data,
53 boundObjectPropertyPath: "selected",
54 oneway: false
55 });
56
57 if(this.data.container) { 51 if(this.data.container) {
58 this.element.title = this.data.subtools[this._subselected].toolTip; 52 this.element.title = this.data.subtools[this._subselected].toolTip;
59 Object.defineBinding(this, "subselected", {
60 boundObject: this.data.subtools,
61 boundObjectPropertyPath: "selected",
62 oneway: true
63 });
64 } 53 }
65 54
66 this.element.classList.add(this.data.id) 55 this.element.classList.add(this.data.id)
diff --git a/js/components/layout/tools-list.reel/tools-list.html b/js/components/layout/tools-list.reel/tools-list.html
index d5c33624..df603bf8 100755
--- a/js/components/layout/tools-list.reel/tools-list.html
+++ b/js/components/layout/tools-list.reel/tools-list.html
@@ -16,11 +16,7 @@
16 "element": {"#": "toolbutton"} 16 "element": {"#": "toolbutton"}
17 }, 17 },
18 "bindings": { 18 "bindings": {
19 "data": { 19 "data": {"<-": "@repetition1.objectAtCurrentIteration"}
20 "boundObject": {"@": "repetition1"},
21 "boundObjectPropertyPath": "objectAtCurrentIteration",
22 "oneway": true
23 }
24 } 20 }
25 }, 21 },
26 22
@@ -30,11 +26,7 @@
30 "element": {"#": "groupLine"} 26 "element": {"#": "groupLine"}
31 }, 27 },
32 "bindings": { 28 "bindings": {
33 "condition": { 29 "condition": {"<-": "@repetition1.objectAtCurrentIteration.lastInGroup"}
34 "boundObject": {"@": "repetition1"},
35 "boundObjectPropertyPath": "objectAtCurrentIteration.lastInGroup",
36 "oneway": true
37 }
38 } 30 }
39 }, 31 },
40 32
diff --git a/js/components/radio.reel/radio.html b/js/components/radio.reel/radio.html
index 01b76b92..cee4c369 100755
--- a/js/components/radio.reel/radio.html
+++ b/js/components/radio.reel/radio.html
@@ -11,13 +11,18 @@
11 "owner": { 11 "owner": {
12 "prototype": "js/components/radio.reel", 12 "prototype": "js/components/radio.reel",
13 "properties": { 13 "properties": {
14 "element": {"#": "ch_comp"} 14 "element": {"#": "radio_comp"},
15 "labelField": {"#": "labelField"},
16 "radioField": {"#": "radioField"}
15 } 17 }
16 } 18 }
17 } 19 }
18 </script> 20 </script>
19</head> 21</head>
20<body> 22<body>
21 <input data-montage-id="ch_comp" class="nj-skinned" type="radio"> 23 <div data-montage-id="radio_comp">
24 <input data-montage-id="radioField" class="nj-skinned" type="radio">
25 <label data-montage-id="labelField" class="nj-skinned"></label>
26 </div>
22</body> 27</body>
23</html> \ No newline at end of file 28</html> \ No newline at end of file
diff --git a/js/components/radio.reel/radio.js b/js/components/radio.reel/radio.js
index c661ec11..cec4f52e 100755
--- a/js/components/radio.reel/radio.js
+++ b/js/components/radio.reel/radio.js
@@ -62,7 +62,7 @@ exports.RadioGroup = Montage.create(Component, {
62 { 62 {
63 value:function(radio) 63 value:function(radio)
64 { 64 {
65 radio.element.setAttribute("name", this.name); 65 radio.radioField.setAttribute("name", this.name);
66 radio.addEventListener("change", this, false); 66 radio.addEventListener("change", this, false);
67 this.radios.push(radio); 67 this.radios.push(radio);
68 } 68 }
@@ -104,6 +104,14 @@ exports.Radio = Montage.create(Component, {
104 value: null 104 value: null
105 }, 105 },
106 106
107 labelField: {
108 value: null
109 },
110
111 radioField: {
112 value: null
113 },
114
107 _checked: { 115 _checked: {
108 enumerable: false, 116 enumerable: false,
109 value: false 117 value: false
@@ -140,13 +148,13 @@ exports.Radio = Montage.create(Component, {
140 { 148 {
141 this._valueSyncedWithInputField = true; 149 this._valueSyncedWithInputField = true;
142 this._wasSetByCode = false; 150 this._wasSetByCode = false;
143 this.checked = this.element.checked; 151 this.checked = this.radioField.checked;
144 } 152 }
145 }, 153 },
146 handleClick: { 154 handleClick: {