diff options
Diffstat (limited to 'js/ninja.reel')
-rwxr-xr-x | js/ninja.reel/ninja.html | 97 | ||||
-rwxr-xr-x | js/ninja.reel/ninja.js | 71 |
2 files changed, 110 insertions, 58 deletions
diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html index 51d74cb2..031d68e9 100755 --- a/js/ninja.reel/ninja.html +++ b/js/ninja.reel/ninja.html | |||
@@ -36,6 +36,9 @@ | |||
36 | "prototype": "js/components/menu/menu.reel", | 36 | "prototype": "js/components/menu/menu.reel", |
37 | "properties": { | 37 | "properties": { |
38 | "element": {"#": "mainMenuBar"} | 38 | "element": {"#": "mainMenuBar"} |
39 | }, | ||
40 | "bindings": { | ||
41 | "currentDocument": {"<-": "@documentList.selectedObjects.0"} | ||
39 | } | 42 | } |
40 | }, | 43 | }, |
41 | 44 | ||
@@ -118,7 +121,7 @@ | |||
118 | ] | 121 | ] |
119 | }, | 122 | }, |
120 | 123 | ||
121 | "Resizer": { | 124 | "resizer3": { |
122 | "prototype": "js/panels/resize-composer", | 125 | "prototype": "js/panels/resize-composer", |
123 | "properties": { | 126 | "properties": { |
124 | "element": {"#": "pasteboardResizer"}, | 127 | "element": {"#": "pasteboardResizer"}, |
@@ -150,45 +153,48 @@ | |||
150 | "element": {"#": "stageMode"} | 153 | "element": {"#": "stageMode"} |
151 | }, | 154 | }, |
152 | "bindings" : { | 155 | "bindings" : { |
153 | "livePreview": { | 156 | "livePreview": {"<<->": "@appModel.livePreview"} |
154 | "boundObject": {"@": "appModel"}, | ||
155 | "boundObjectPropertyPath": "livePreview", | ||
156 | "oneway": false | ||
157 | } | ||
158 | } | 157 | } |
159 | }, | 158 | }, |
160 | 159 | ||
161 | "toolsList1": { | 160 | "toolsList": { |
162 | "prototype": "js/components/layout/tools-list.reel", | 161 | "prototype": "js/components/layout/tools-list.reel", |
163 | "properties": { | 162 | "properties": { |
164 | "element": {"#": "toolsList"}, | 163 | "element": {"#": "toolsList"}, |
165 | "toolsData": {"@": "toolsData1"} | 164 | "toolsData": {"@": "toolsData1"} |
165 | }, | ||
166 | "bindings": { | ||
167 | "currentDocument": {"<-": "@documentList.selectedObjects.0"} | ||
166 | } | 168 | } |
167 | }, | 169 | }, |
168 | 170 | ||
169 | "toolsProperties1": { | 171 | "toolsProperties": { |
170 | "prototype": "js/components/layout/tools-properties.reel", | 172 | "prototype": "js/components/layout/tools-properties.reel", |
171 | "properties": { | 173 | "properties": { |
172 | "element": {"#": "toolsProperties"}, | 174 | "element": {"#": "toolsProperties"}, |
173 | "toolsData": {"@": "toolsData1"} | 175 | "toolsData": {"@": "toolsData1"} |
176 | }, | ||
177 | "bindings": { | ||
178 | "currentDocument": {"<-": "@documentList.selectedObjects.0"} | ||
174 | } | 179 | } |
175 | }, | 180 | }, |
176 | 181 | ||
177 | "documentsTab": { | 182 | "documentsTab": { |
178 | "prototype": "js/components/layout/documents-tab.reel", | 183 | "prototype": "js/components/layout/documents-tab.reel", |
179 | "properties": { | 184 | "properties": { |
180 | "element": {"#": "openDocumentsTabComponent"} | 185 | "element": {"#": "openDocumentsTabComponent"}, |
186 | "contentController": {"@": "documentList"} | ||
181 | } | 187 | } |
182 | }, | 188 | }, |
183 | 189 | ||
184 | "stage1": { | 190 | "stage": { |
185 | "prototype": "js/stage/stage.reel", | 191 | "prototype": "js/stage/stage.reel", |
186 | "properties": { | 192 | "properties": { |
187 | "element": {"#": "stageAndScenesContainer"}, | 193 | "element": {"#": "stageAndScenesContainer"}, |
188 | "appModel": {"@": "appModel"} | 194 | "appModel": {"@": "appModel"} |
189 | }, | 195 | }, |
190 | "bindings": { | 196 | "bindings": { |
191 | "activeDocument": {"<-": "@documentController1.activeDocument"} | 197 | "currentDocument": {"<-": "@documentList.selectedObjects.0"} |
192 | } | 198 | } |
193 | }, | 199 | }, |
194 | 200 | ||
@@ -196,6 +202,9 @@ | |||
196 | "prototype": "js/components/layout/document-bar.reel", | 202 | "prototype": "js/components/layout/document-bar.reel", |
197 | "properties": { | 203 | "properties": { |
198 | "element": {"#": "documentBar"} | 204 | "element": {"#": "documentBar"} |
205 | }, | ||
206 | "bindings": { | ||
207 | "currentDocument": {"<-": "@documentList.selectedObjects.0"} | ||
199 | } | 208 | } |
200 | }, | 209 | }, |
201 | 210 | ||
@@ -212,6 +221,9 @@ | |||
212 | "element": {"#": "rightPanelContent"}, | 221 | "element": {"#": "rightPanelContent"}, |
213 | "panelSplitter": {"@": "splitter3"}, | 222 | "panelSplitter": {"@": "splitter3"}, |
214 | "appModel": {"@": "appModel"} | 223 | "appModel": {"@": "appModel"} |
224 | }, | ||
225 | "bindings" : { | ||
226 | "currentDocument": {"<-": "@documentList.selectedObjects.0"} | ||
215 | } | 227 | } |
216 | }, | 228 | }, |
217 | 229 | ||
@@ -221,19 +233,19 @@ | |||
221 | "element":{"#" : "breadCrumbComponent"} | 233 | "element":{"#" : "breadCrumbComponent"} |
222 | }, | 234 | }, |
223 | "bindings" : { | 235 | "bindings" : { |
224 | "container": { | 236 | "container": {"<<->": "@owner.currentSelectedContainer"}, |
225 | "boundObject": {"@": "owner"}, | 237 | "currentDocument": {"<-": "@documentList.selectedObjects.0"} |
226 | "boundObjectPropertyPath": "currentSelectedContainer", | ||
227 | "oneway": false | ||
228 | } | ||
229 | } | 238 | } |
230 | }, | 239 | }, |
231 | 240 | ||
232 | "timeline": { | 241 | "timeline": { |
233 | "prototype": "js/panels/Timeline/TimelinePanel.reel", | 242 | "prototype": "js/panels/Timeline/TimelinePanel.reel", |
234 | "properties": { | 243 | "properties": { |
235 | "element": {"#": "timelinePanelComponent"} | 244 | "element": {"#": "timelinePanelComponent"} |
236 | } | 245 | }, |
246 | "bindings": { | ||
247 | "currentDocument": {"<-": "@documentList.selectedObjects.0"} | ||
248 | } | ||
237 | }, | 249 | }, |
238 | 250 | ||
239 | "mouseMediator": { | 251 | "mouseMediator": { |
@@ -263,15 +275,30 @@ | |||
263 | "prototype": "js/controllers/undo-controller" | 275 | "prototype": "js/controllers/undo-controller" |
264 | }, | 276 | }, |
265 | 277 | ||
266 | "selectionController1": { | 278 | "selectionController": { |
267 | "prototype": "js/controllers/selection-controller", | 279 | "prototype": "js/controllers/selection-controller", |
268 | "bindings" : { | 280 | "bindings" : { |
269 | "selectionContainer": {"<-": "@owner.currentSelectedContainer"} | 281 | "selectionContainer": {"<-": "@owner.currentSelectedContainer"}, |
282 | "currentDocument": {"<-": "@documentList.selectedObjects.0"}, | ||
283 | "selectedElements": {"<-": "@documentList.selectedObjects.0.model.selection"} | ||
270 | } | 284 | } |
271 | }, | 285 | }, |
272 | 286 | ||
273 | "documentController1": { | 287 | "documentController": { |
274 | "prototype": "js/controllers/document-controller" | 288 | "prototype": "js/controllers/document-controller", |
289 | "bindings": { | ||
290 | "currentDocument": {"<-": "@documentList.selectedObjects.0"} | ||
291 | } | ||
292 | }, | ||
293 | |||
294 | "documentList": { | ||
295 | "prototype": "montage/ui/controller/array-controller", | ||
296 | "properties": { | ||
297 | "selectObjectsOnAddition": true | ||
298 | }, | ||
299 | "bindings": { | ||
300 | "content": {"<<->": "@documentController.documents"} | ||
301 | } | ||
275 | }, | 302 | }, |
276 | 303 | ||
277 | "popupManager1": { | 304 | "popupManager1": { |
@@ -288,7 +315,7 @@ | |||
288 | "stylesController": { | 315 | "stylesController": { |
289 | "prototype": "js/controllers/styles-controller", | 316 | "prototype": "js/controllers/styles-controller", |
290 | "bindings": { | 317 | "bindings": { |
291 | "activeDocument": {"<-": "@documentController1.activeDocument"} | 318 | "currentDocument": {"<-": "@documentList.selectedObjects.0"} |
292 | } | 319 | } |
293 | }, | 320 | }, |
294 | 321 | ||
@@ -320,7 +347,10 @@ | |||
320 | }, | 347 | }, |
321 | 348 | ||
322 | "codeEditorController": { | 349 | "codeEditorController": { |
323 | "prototype": "js/controllers/code-editor-controller" | 350 | "prototype": "js/controllers/code-editor-controller", |
351 | "bindings": { | ||
352 | "currentDocument": {"<-": "@documentList.selectedObjects.0"} | ||
353 | } | ||
324 | }, | 354 | }, |
325 | 355 | ||
326 | "owner": { | 356 | "owner": { |
@@ -331,14 +361,14 @@ | |||
331 | "rulerLeft": {"#": "rulerLeft"}, | 361 | "rulerLeft": {"#": "rulerLeft"}, |
332 | "appModel": {"@": "appModel"}, | 362 | "appModel": {"@": "appModel"}, |
333 | "toolsData": {"@": "toolsData1"}, | 363 | "toolsData": {"@": "toolsData1"}, |
334 | "toolsList": {"@": "toolsList1"}, | 364 | "toolsList": {"@": "toolsList"}, |
335 | "toolsProperties": {"@": "toolsProperties1"}, | 365 | "toolsProperties": {"@": "toolsProperties"}, |
336 | "stage": {"@": "stage1"}, | 366 | "stage": {"@": "stage"}, |
337 | "elementMediator": {"@": "elementMediator"}, | 367 | "elementMediator": {"@": "elementMediator"}, |
338 | "dragDropMediator": {"@": "dragDropMediator"}, | 368 | "dragDropMediator": {"@": "dragDropMediator"}, |
339 | "undocontroller": {"@": "undocontroller1"}, | 369 | "undocontroller": {"@": "undocontroller1"}, |
340 | "selectionController": {"@": "selectionController1"}, | 370 | "selectionController": {"@": "selectionController"}, |
341 | "documentController": {"@": "documentController1"}, |