diff options
author | hwc487 | 2012-04-19 13:01:43 -0700 |
---|---|---|
committer | hwc487 | 2012-04-19 13:01:43 -0700 |
commit | e6a20fe64574763483dc602bd759278ccf5e5e68 (patch) | |
tree | 69defe7200206f0257fe90697136fadef59d521e /js/ninja.reel | |
parent | ae7eb87564632ce7c676bd728b8ff2710ff0bb83 (diff) | |
parent | 9284c19f076dec3b47ece7dc7bcd22d74e4246c3 (diff) | |
download | ninja-e6a20fe64574763483dc602bd759278ccf5e5e68.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Textures
Conflicts:
js/lib/drawing/world.js
js/lib/geom/geom-obj.js
js/lib/rdge/materials/cloud-material.js
js/lib/rdge/materials/deform-material.js
js/lib/rdge/materials/flat-material.js
js/lib/rdge/materials/material.js
js/lib/rdge/materials/pulse-material.js
js/lib/rdge/materials/relief-tunnel-material.js
js/lib/rdge/materials/square-tunnel-material.js
js/lib/rdge/materials/star-material.js
js/lib/rdge/materials/taper-material.js
js/lib/rdge/materials/tunnel-material.js
js/lib/rdge/materials/twist-material.js
js/lib/rdge/materials/twist-vert-material.js
js/lib/rdge/materials/uber-material.js
js/lib/rdge/materials/water-material.js
js/lib/rdge/materials/z-invert-material.js
Diffstat (limited to 'js/ninja.reel')
-rwxr-xr-x | js/ninja.reel/ninja.html | 107 | ||||
-rwxr-xr-x | js/ninja.reel/ninja.js | 139 |
2 files changed, 217 insertions, 29 deletions
diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html index f9e1efdd..ead7f576 100755 --- a/js/ninja.reel/ninja.html +++ b/js/ninja.reel/ninja.html | |||
@@ -77,34 +77,83 @@ | |||
77 | "name": "Splitter", | 77 | "name": "Splitter", |
78 | "properties": { | 78 | "properties": { |
79 | "element": {"#": "bottomSplitter"}, | 79 | "element": {"#": "bottomSplitter"}, |
80 | "panel": {"#": "bottomPanelContainer"}, | 80 | "panel": {"@": "timeline"} |
81 | "resizeBar": {"#": "timelineResizer"} | ||
82 | } | 81 | } |
83 | }, | 82 | }, |
84 | 83 | ||
85 | "resizer1": { | 84 | "resizer1": { |
86 | "module": "js/panels/Resizer", | 85 | "module": "js/panels/resize-composer", |
87 | "name": "Resizer", | 86 | "name": "ResizeComposer", |
88 | "properties": { | 87 | "properties": { |
89 | "element": {"#": "rightPanelResizer"}, | 88 | "element": {"#": "rightPanelResizer"}, |
90 | "id": "rightPanelResizer", | 89 | "component": {"@": "owner"}, |
91 | "panel": {"#": "rightPanelContainer"}, | 90 | "yAxis": false |
92 | "isVertical": false, | 91 | }, |
93 | "redrawStage": true | 92 | "listeners": [ |
94 | } | 93 | { |
94 | "type": "resizeStart", | ||
95 | "listener": {"@": "owner"} | ||
96 | }, | ||
97 | { | ||
98 | "type": "resizeMove", | ||
99 | "listener": {"@": "owner"} | ||
100 | }, | ||
101 | { | ||
102 | "type": "resizeEnd", | ||
103 | "listener": {"@": "owner"} | ||
104 | } | ||
105 | ] | ||
95 | }, | 106 | }, |
96 | 107 | ||
97 | "resizer2": { | 108 | "resizer2": { |
98 | "module": "js/panels/Resizer", | 109 | "module": "js/panels/resize-composer", |
99 | "name": "Resizer", | 110 | "name": "ResizeComposer", |
100 | "properties": { | 111 | "properties": { |
101 | "element": {"#": "timelineResizer"}, | 112 | "element": {"#": "timelineResizer"}, |
102 | "id": "timelineResizer", | 113 | "component": {"@": "owner"}, |
103 | "panel": {"#": "bottomPanelContainer"}, | 114 | "xAxis": false |
104 | "isVertical": true, | 115 | }, |
105 | "isInversed": true, | 116 | "listeners": [ |
106 | "redrawStage": true | 117 | { |
107 | } | 118 | "type": "resizeStart", |
119 | "listener": {"@": "owner"} | ||
120 | }, | ||
121 | { | ||
122 | "type": "resizeMove", | ||
123 | "listener": {"@": "owner"} | ||
124 | }, | ||
125 | { | ||
126 | "type": "resizeEnd", | ||
127 | "listener": {"@": "owner"} | ||
128 | } | ||
129 | ] | ||
130 | }, | ||
131 | |||
132 | "Resizer": { | ||
133 | "module": "js/panels/resize-composer", | ||
134 | "name": "ResizeComposer", | ||
135 | "properties": { | ||
136 | "element": {"#": "pasteboardResizer"}, | ||
137 | "component": {"@": "owner"} | ||
138 | }, | ||
139 | "listeners": [ | ||
140 | { | ||
141 | "type": "resizeStart", | ||
142 | "listener": {"@": "owner"} | ||
143 | }, | ||
144 | { | ||
145 | "type": "resizeMove", | ||
146 | "listener": {"@": "owner"} | ||
147 | }, | ||
148 | { | ||
149 | "type": "resizeEnd", | ||
150 | "listener": {"@": "owner"} | ||
151 | }, | ||
152 | { | ||
153 | "type": "resizeReset", | ||
154 | "listener": {"@": "owner"} | ||
155 | } | ||
156 | ] | ||
108 | }, | 157 | }, |
109 | 158 | ||
110 | "stageMode": { | 159 | "stageMode": { |
@@ -267,6 +316,11 @@ | |||
267 | "name": "StylesController" | 316 | "name": "StylesController" |
268 | }, | 317 | }, |
269 | 318 | ||
319 | "presetsController": { | ||
320 | "module": "js/controllers/presets-controller", | ||
321 | "name": "PresetsController" | ||
322 | }, | ||
323 | |||
270 | "filePickerController": { | 324 | "filePickerController": { |
271 | "module": "js/io/ui/file-picker/file-picker-controller", | 325 | "module": "js/io/ui/file-picker/file-picker-controller", |
272 | "name": "FilePickerController" | 326 | "name": "FilePickerController" |
@@ -315,13 +369,17 @@ | |||
315 | "popupManager": {"@": "popupManager1"}, | 369 | "popupManager": {"@": "popupManager1"}, |
316 | "colorController": {"@": "colorController1"}, | 370 | "colorController": {"@": "colorController1"}, |
317 | "stylesController": {"@": "stylesController"}, | 371 | "stylesController": {"@": "stylesController"}, |
372 | "presetsController": {"@": "presetsController"}, | ||
318 | "filePickerController": {"@": "filePickerController"}, | 373 | "filePickerController": {"@": "filePickerController"}, |
319 | "newFileController": {"@": "newFileController"}, | 374 | "newFileController": {"@": "newFileController"}, |
320 | "coreIoApi": {"@": "coreIoApi1"}, | 375 | "coreIoApi": {"@": "coreIoApi1"}, |
321 | "documentBar": {"@": "documentBar"}, | 376 | "documentBar": {"@": "documentBar"}, |
322 | "ioMediator": {"@": "ioMediator"}, | 377 | "ioMediator": {"@": "ioMediator"}, |
323 | "timeline": {"@": "timeline"}, | 378 | "timeline": {"@": "timeline"}, |
324 | "mainMenuController": {"@": "mainMenuController"} | 379 | "mainMenuController": {"@": "mainMenuController"}, |
380 | "rightPanelContainer": {"#": "rightPanelContainer" }, | ||
381 | "panelSplitter": {"@": "splitter3"}, | ||
382 | "timelineSplitter": {"@": "splitter4"} | ||
325 | } | 383 | } |
326 | } | 384 | } |
327 | } | 385 | } |
@@ -374,7 +432,9 @@ | |||
374 | <section id="mainContent"> | 432 | <section id="mainContent"> |
375 | <section id="rulerLeft"></section> | 433 | <section id="rulerLeft"></section> |
376 | <section id="stageAndScenesContainer"></section> | 434 | <section id="stageAndScenesContainer"></section> |
435 | <section id="pasteboardResizer" class="pasteboardResizer resizeBar"></section> | ||
377 | </section> | 436 | </section> |
437 | <section id="timelineResizer" class="timelineResizer resizeBar"></section> | ||
378 | <section id="stateBar"> | 438 | <section id="stateBar"> |
379 | <section id="documentBarContainer"> | 439 | <section id="documentBarContainer"> |
380 | <div id="documentBar" class="documentBar"><a href="#">HTML</a></div> | 440 | <div id="documentBar" class="documentBar"><a href="#">HTML</a></div> |
@@ -382,20 +442,13 @@ | |||
382 | </section> | 442 | </section> |
383 | 443 | ||
384 | <section id="breadCrumbComponent"></section> | 444 | <section id="breadCrumbComponent"></section> |
385 | 445 | <div id="timelinePanelComponent" data-montage-id="timelinePanel" class="timelinePanel"></div> | |
386 | <section id="timelineResizer" class="timelineResizer resizeBar"></section> | ||
387 | |||
388 | <section id="bottomPanelContainer" class="panelContainer"> | ||
389 | <section id="timelinePanel" class="panel"> | ||
390 | <div id="timelinePanelComponent"></div> | ||
391 | </section> | ||
392 | </section> | ||
393 | </section> | 446 | </section> |
394 | </section> | 447 | </section> |
395 | 448 | ||
396 | <section data-montage-id="rightPanelResizer" class="rightPanelResizer resizeBar"></section> | 449 | <section data-montage-id="rightPanelResizer" class="rightPanelResizer resizeBar"></section> |
397 | 450 | ||
398 | <section id="rightPanelContainer" class="rightPanelContainer panelContainer"> | 451 | <section id="rightPanelContainer" data-montage-id="rightPanelContainer" class="rightPanelContainer panelContainer"> |
399 | <section id="rightPanelContent" class="rightPanelContent"> | 452 | <section id="rightPanelContent" class="rightPanelContent"> |
400 | </section> | 453 | </section> |
401 | </section> | 454 | </section> |
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index c76c7d46..9b5081dd 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | var Montage = require("montage/core/core").Montage, | 7 | var Montage = require("montage/core/core").Montage, |
8 | Component = require("montage/ui/component").Component, | 8 | Component = require("montage/ui/component").Component, |
9 | UndoManager = require("montage/core/undo-manager").UndoManager, | ||
9 | AppData = require("js/data/appdata").AppData; | 10 | AppData = require("js/data/appdata").AppData; |
10 | 11 | ||
11 | var matrix = require("js/lib/math/matrix"); | 12 | var matrix = require("js/lib/math/matrix"); |
@@ -23,6 +24,113 @@ exports.Ninja = Montage.create(Component, { | |||
23 | value: null | 24 | value: null |
24 | }, | 25 | }, |
25 | 26 | ||
27 | _isResizing: { | ||
28 | value: null | ||
29 | }, | ||
30 | _resizedHeight : { | ||
31 | value: 0 | ||
32 | }, | ||
33 | _height: { | ||
34 | value: null | ||
35 | }, | ||
36 | |||
37 | height: { | ||
38 | get: function() { | ||
39 | if(this._height === null) { | ||
40 | var storedData = this.application.localStorage.getItem("timelinePanel"); | ||
41 | if(storedData && storedData.value) { | ||
42 | this._height = storedData.value; | ||
43 | } | ||
44 | } | ||
45 | return this._height; | ||
46 | }, | ||
47 | set: function(val) { | ||
48 | if(this._height != val) { | ||
49 | this._height = val; | ||
50 | this.application.localStorage.setItem("timelinePanel", {"version": this.version, "value": val}); | ||
51 | this.needsDraw = true; | ||
52 | } | ||
53 | |||
54 | } | ||