diff options
author | Pushkar Joshi | 2012-02-24 12:08:49 -0800 |
---|---|---|
committer | Pushkar Joshi | 2012-02-24 12:08:49 -0800 |
commit | 03ca7a5ed13c25faaa9100bb666e062fd15335e6 (patch) | |
tree | c51112223ceb9121cd595a60335eb2795215590f /js/ninja.reel | |
parent | fcb12cc09eb3cd3b42bd215877ba18f449275b75 (diff) | |
parent | 053fc63a2950c7a5ee4ebf98033b64d474a3c46e (diff) | |
download | ninja-03ca7a5ed13c25faaa9100bb666e062fd15335e6.tar.gz |
Merge branch 'pentool' into brushtool
Conflicts:
imports/codemirror/mode/scheme/scheme.js
js/tools/BrushTool.js
Diffstat (limited to 'js/ninja.reel')
-rwxr-xr-x[-rw-r--r--] | js/ninja.reel/ninja.css | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | js/ninja.reel/ninja.html | 49 | ||||
-rwxr-xr-x[-rw-r--r--] | js/ninja.reel/ninja.js | 21 |
3 files changed, 47 insertions, 25 deletions
diff --git a/js/ninja.reel/ninja.css b/js/ninja.reel/ninja.css index 99fa9a4f..83c0e569 100644..100755 --- a/js/ninja.reel/ninja.css +++ b/js/ninja.reel/ninja.css | |||
@@ -7,5 +7,3 @@ | |||
7 | .main { | 7 | .main { |
8 | padding: 100px; | 8 | padding: 100px; |
9 | } | 9 | } |
10 | |||
11 | |||
diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html index 706c8243..1393b4b9 100644..100755 --- a/js/ninja.reel/ninja.html +++ b/js/ninja.reel/ninja.html | |||
@@ -216,6 +216,11 @@ | |||
216 | "name": "ElementMediator" | 216 | "name": "ElementMediator" |
217 | }, | 217 | }, |
218 | 218 | ||
219 | "ioMediator": { | ||
220 | "module": "js/mediators/io-mediator", | ||
221 | "name": "IoMediator" | ||
222 | }, | ||
223 | |||
219 | "undocontroller1": { | 224 | "undocontroller1": { |
220 | "module": "js/controllers/undo-controller", | 225 | "module": "js/controllers/undo-controller", |
221 | "name": "UndoController" | 226 | "name": "UndoController" |
@@ -223,11 +228,19 @@ | |||
223 | 228 | ||
224 | "selectionController1": { | 229 | "selectionController1": { |
225 | "module": "js/controllers/selection-controller", | 230 | "module": "js/controllers/selection-controller", |
226 | "name": "SelectionController" | 231 | "name": "SelectionController", |
232 | "bindings" : { | ||
233 | "selectionContainer": { | ||
234 | "boundObject": {"@": "owner"}, | ||
235 | "boundObjectPropertyPath": "currentSelectedContainer", | ||
236 | "oneway": true | ||
237 | } | ||
238 | } | ||
239 | |||
227 | }, | 240 | }, |
228 | 241 | ||
229 | "documentController1": { | 242 | "documentController1": { |
230 | "module": "js/io/document/document-controller", | 243 | "module": "js/controllers/document-controller", |
231 | "name": "DocumentController" | 244 | "name": "DocumentController" |
232 | }, | 245 | }, |
233 | 246 | ||
@@ -250,20 +263,32 @@ | |||
250 | }, | 263 | }, |
251 | 264 | ||
252 | "filePickerController": { | 265 | "filePickerController": { |
253 | "module": "js/components/ui/FilePicker/file-picker-controller", | 266 | "module": "js/io/ui/file-picker/file-picker-controller", |
254 | "name": "FilePickerController" | 267 | "name": "FilePickerController" |
255 | }, | 268 | }, |
256 | 269 | ||
257 | "newFileController": { | 270 | "newFileController": { |
258 | "module": "js/io/workflow/newFileDialog/new-file-workflow-controller", | 271 | "module": "js/io/ui/new-file-dialog/new-file-workflow-controller", |
259 | "name": "NewFileWorkflowController" | 272 | "name": "NewFileWorkflowController" |
260 | }, | 273 | }, |
274 | |||
275 | "coreIoApi1": { | ||
276 | "module": "js/io/system/coreioapi", | ||
277 | "name": "CoreIoApi" | ||
278 | }, | ||
279 | |||
280 | "mainMenuController": { | ||
281 | "module": "js/controllers/main-menu-controller", | ||
282 | "name": "MainMenuController" | ||
283 | }, | ||
261 | 284 | ||
262 | "owner": { | 285 | "owner": { |
263 | "module": "js/ninja.reel", | 286 | "module": "js/ninja.reel", |
264 | "name": "Ninja", | 287 | "name": "Ninja", |
265 | "properties": { | 288 | "properties": { |
266 | "element": {"#": "main"}, | 289 | "element": {"#": "main"}, |
290 | "rulerTop": {"#": "rulerTop"}, | ||
291 | "rulerLeft": {"#": "rulerLeft"}, | ||
267 | "appModel": {"@": "appModel"}, | 292 | "appModel": {"@": "appModel"}, |
268 | "toolsData": {"@": "toolsData1"}, | 293 | "toolsData": {"@": "toolsData1"}, |
269 | "toolsList": {"@": "toolsList1"}, | 294 | "toolsList": {"@": "toolsList1"}, |
@@ -271,6 +296,7 @@ | |||
271 | "stage": {"@": "stage1"}, | 296 | "stage": {"@": "stage1"}, |
272 | "settings": {"@": "settings1"}, | 297 | "settings": {"@": "settings1"}, |
273 | "elementMediator": {"@": "elementMediator"}, | 298 | "elementMediator": {"@": "elementMediator"}, |
299 | "dragDropMediator": {"@": "dragDropMediator"}, | ||
274 | "undocontroller": {"@": "undocontroller1"}, | 300 | "undocontroller": {"@": "undocontroller1"}, |
275 | "selectionController": {"@": "selectionController1"}, | 301 | "selectionController": {"@": "selectionController1"}, |
276 | "documentController": {"@": "documentController1"}, | 302 | "documentController": {"@": "documentController1"}, |
@@ -279,10 +305,13 @@ | |||
279 | "stylesController": {"@": "stylesController"}, | 305 | "stylesController": {"@": "stylesController"}, |
280 | "filePickerController": {"@": "filePickerController"}, | 306 | "filePickerController": {"@": "filePickerController"}, |
281 | "newFileController": {"@": "newFileController"}, | 307 | "newFileController": {"@": "newFileController"}, |
282 | "documentBar": {"@": "documentBar"} | 308 | "coreIoApi": {"@": "coreIoApi1"}, |
309 | "documentBar": {"@": "documentBar"}, | ||
310 | "ioMediator": {"@": "ioMediator"}, | ||
311 | "timeline": {"@": "timeline"}, | ||
312 | "mainMenuController": {"@": "mainMenuController"} | ||
283 | } | 313 | } |
284 | } | 314 | } |
285 | |||
286 | } | 315 | } |
287 | </script> | 316 | </script> |
288 | 317 | ||
@@ -334,9 +363,6 @@ | |||
334 | <section id="rulerLeft"></section> | 363 | <section id="rulerLeft"></section> |
335 | <section id="stageAndScenesContainer"></section> | 364 | <section id="stageAndScenesContainer"></section> |
336 | </section> | 365 | </section> |
337 | |||
338 | <section id="sceneBar" style="display: none;"></section> | ||
339 | |||
340 | <section id="stateBar"> | 366 | <section id="stateBar"> |
341 | <section id="documentBarContainer"> | 367 | <section id="documentBarContainer"> |
342 | <div id="documentBar" class="documentBar"><a href="#">HTML</a></div> | 368 | <div id="documentBar" class="documentBar"><a href="#">HTML</a></div> |
@@ -344,13 +370,10 @@ | |||
344 | </section> | 370 | </section> |
345 | 371 | ||
346 | <section id="timelineResizer" class="timelineResizer resizeBar"></section> | 372 | <section id="timelineResizer" class="timelineResizer resizeBar"></section> |
347 | |||
348 | <section id="bottomPanelContainer" class="panelContainer"> | ||
349 | |||
350 | <section id="breadCrumbTrail"> | 373 | <section id="breadCrumbTrail"> |
351 | <div id="breadCrumbComponent"></div> | 374 | <div id="breadCrumbComponent"></div> |
352 | </section> | 375 | </section> |
353 | 376 | <section id="bottomPanelContainer" class="panelContainer"> | |
354 | <section id="timelinePanel" class="panel"> | 377 | <section id="timelinePanel" class="panel"> |
355 | <div id="timelinePanelComponent"></div> | 378 | <div id="timelinePanelComponent"></div> |
356 | </section> | 379 | </section> |
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index 469d38f7..6efeef8a 100644..100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js | |||
@@ -60,11 +60,18 @@ exports.Ninja = Montage.create(Component, { | |||
60 | this.eventManager.addEventListener( "onOpenDocument", this, false); | 60 | this.eventManager.addEventListener( "onOpenDocument", this, false); |
61 | 61 | ||
62 | this.addEventListener("change@appModel.livePreview", this.executeLivePreview, false); | 62 | this.addEventListener("change@appModel.livePreview", this.executeLivePreview, false); |
63 | this.addEventListener("change@appModel.chromePreview", this.executeChromePreview, false); | ||
63 | this.addEventListener("change@appModel.debug", this.toggleDebug, false); | 64 | this.addEventListener("change@appModel.debug", this.toggleDebug, false); |
64 | 65 | ||
65 | NJevent("appLoading"); | 66 | NJevent("appLoading"); |
66 | } | 67 | } |
67 | }, | 68 | }, |
69 | |||
70 | executeChromePreview: { | ||
71 | value: function () { | ||
72 | this.application.ninja.documentController.activeDocument.livePreview(); | ||
73 | } | ||
74 | }, | ||
68 | 75 | ||
69 | handleResize: { | 76 | handleResize: { |
70 | value: function() { | 77 | value: function() { |
@@ -102,6 +109,9 @@ exports.Ninja = Montage.create(Component, { | |||
102 | didDraw: { | 109 | didDraw: { |
103 | value: function() { | 110 | value: function() { |
104 | if(!this._didDraw) { | 111 | if(!this._didDraw) { |
112 | if (!this.application.ninja.coreIoApi.ioServiceDetected) { | ||
113 | var check = this.application.ninja.coreIoApi.cloudAvailable(); | ||
114 | } | ||
105 | NJevent("appLoaded"); | 115 | NJevent("appLoaded"); |
106 | this._didDraw = true; | 116 | this._didDraw = true; |
107 | } | 117 | } |
@@ -158,19 +168,10 @@ exports.Ninja = Montage.create(Component, { | |||
158 | 168 | ||
159 | this.appModel.show3dGrid = this.currentDocument.draw3DGrid; | 169 | this.appModel.show3dGrid = this.currentDocument.draw3DGrid; |
160 | 170 | ||
161 | this.currentDocument._document.body.addEventListener("userTemplateDidLoad", this.userTemplateDidLoad.bind(this), false); | ||
162 | |||
163 | |||
164 | NJevent("openDocument"); | 171 | NJevent("openDocument"); |
165 | } | 172 | } |
166 | }, | 173 | }, |
167 | 174 | ||
168 | userTemplateDidLoad: { | ||
169 | value: function(){ | ||
170 | this.currentSelectedContainer = this.currentDocument.documentRoot; | ||
171 | } | ||
172 | }, | ||
173 | |||
174 | executeLivePreview: { | 175 | executeLivePreview: { |
175 | value: function() { | 176 | value: function() { |
176 | var background, overflow, transitionStopRule; | 177 | var background, overflow, transitionStopRule; |
@@ -186,7 +187,7 @@ exports.Ninja = Montage.create(Component, { | |||
186 | transitionStopRule = "*" | 187 | transitionStopRule = "*" |
187 | } | 188 | } |
188 | 189 | ||
189 | this.currentDocument.documentRoot.elementModel.controller.setProperty(this.currentDocument.documentRoot, "background", background); | 190 | this.currentDocument.documentRoot.elementModel.controller.setProperty(this.currentDocument.documentRoot, "body-background", background); |
190 | this.currentDocument.documentRoot.elementModel.controller.setProperty(this.currentDocument.documentRoot, "overflow", overflow); | 191 | this.currentDocument.documentRoot.elementModel.controller.setProperty(this.currentDocument.documentRoot, "overflow", overflow); |
191 | this.currentDocument.documentRoot.elementModel.controller.changeSelector(this.currentDocument.documentRoot, "transitionStopRule", transitionStopRule); | 192 | this.currentDocument.documentRoot.elementModel.controller.changeSelector(this.currentDocument.documentRoot, "transitionStopRule", t |