diff options
author | Valerio Virgillito | 2012-02-12 21:50:49 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-12 21:50:49 -0800 |
commit | dcd147265ad0339448ea4466253b03b2899e0cea (patch) | |
tree | a2afd9a3f4b4545141b21a31002d81bb5f79f44b /js/panels | |
parent | a30d76ff641ce89686cf5fbd9f04ac9ab4e9c830 (diff) | |
parent | e142611e22718b1f1d1696902ad9161ec5f33f98 (diff) | |
download | ninja-dcd147265ad0339448ea4466253b03b2899e0cea.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into stage-color
Diffstat (limited to 'js/panels')
59 files changed, 5403 insertions, 280 deletions
diff --git a/js/panels/CSSPanel/CSSPanel.js b/js/panels/CSSPanel/CSSPanel.js index 94860b30..cf8880a3 100644 --- a/js/panels/CSSPanel/CSSPanel.js +++ b/js/panels/CSSPanel/CSSPanel.js | |||
@@ -20,9 +20,9 @@ exports.CSSPanel = Montage.create(PanelBase, { | |||
20 | init : { | 20 | init : { |
21 | enumerable:true, | 21 | enumerable:true, |
22 | value : function (){ | 22 | value : function (){ |
23 | this.minHeight = 300; | 23 | this.minHeight = 195; |
24 | this.contentHeight = 300; | 24 | this.contentHeight = 195; |
25 | this.defaultHeight= 300; | 25 | this.defaultHeight= 195; |
26 | 26 | ||
27 | /* OLD WAY -- Removing the temporary div | 27 | /* OLD WAY -- Removing the temporary div |
28 | // TODO: Remove this comment once this is tested. | 28 | // TODO: Remove this comment once this is tested. |
diff --git a/js/panels/Materials/Materials.xml b/js/panels/Materials/Materials.xml index cdeee69e..e955623a 100644 --- a/js/panels/Materials/Materials.xml +++ b/js/panels/Materials/Materials.xml | |||
@@ -2,17 +2,10 @@ | |||
2 | <tree id="Materials"> | 2 | <tree id="Materials"> |
3 | <folder id="ninjaMaterials" label="Ninja Materials"> | 3 | <folder id="ninjaMaterials" label="Ninja Materials"> |
4 | <leaf id="UberMaterial" label="Uber" /> | 4 | <leaf id="UberMaterial" label="Uber" /> |
5 | <leaf id="RadialBlurMaterial" label="Radial Blur" /> | ||
6 | <leaf id="PulseMaterial" label="Pulse" /> | ||
7 | <leaf id="TunnelMaterial" label="Tunnel" /> | ||
8 | <leaf id="TwistMaterial" label="Twist" /> | ||
9 | <leaf id="KeleidoscopeMaterial" label="Keleidoscope" /> | ||
10 | <leaf id="JuliaMaterial" label="Julia" /> | ||
11 | <leaf id="MandelMaterial" label="Mandel" /> | ||
12 | <leaf id="PlasmaMaterial" label="Plasma" /> | ||
13 | <leaf id="BumpMetalMaterial" label="Bump Metal" /> | 5 | <leaf id="BumpMetalMaterial" label="Bump Metal" /> |
14 | <leaf id="LinearGradientMaterial" label="Linear Gradient" /> | 6 | <leaf id="LinearGradientMaterial" label="Linear Gradient" /> |
15 | <leaf id="RadialGradientMaterial" label="Radial Gradient" /> | 7 | <leaf id="RadialGradientMaterial" label="Radial Gradient" /> |
8 | <leaf id="FlatMaterial" label="Flat" /> | ||
16 | </folder> | 9 | </folder> |
17 | <folder id="customMaterials" label="Custom Materials"> | 10 | <folder id="customMaterials" label="Custom Materials"> |
18 | <leaf id="CheckerBoard" label="CheckerBoard" /> | 11 | <leaf id="CheckerBoard" label="CheckerBoard" /> |
diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js index afdc3628..62ca5395 100644 --- a/js/panels/Materials/materials-popup.reel/materials-popup.js +++ b/js/panels/Materials/materials-popup.reel/materials-popup.js | |||
@@ -236,21 +236,11 @@ exports.MaterialsPopup = Montage.create(Component, { | |||
236 | { | 236 | { |
237 | this._materialName = materialID; | 237 | this._materialName = materialID; |
238 | if( | 238 | if( |
239 | (materialID === "BrickMaterial") || | 239 | (materialID === "UberMaterial") || |
240 | (materialID === "UberMaterial") || | ||
241 | (materialID === "FlatMaterial") || | 240 | (materialID === "FlatMaterial") || |
242 | (materialID === "BumpMetalMaterial") || | 241 | (materialID === "BumpMetalMaterial") || |
243 | (materialID === "PlasmaMaterial") || | ||
244 | (materialID === "LinearGradientMaterial") || | 242 | (materialID === "LinearGradientMaterial") || |
245 | (materialID === "RadialGradientMaterial") || | 243 | (materialID === "RadialGradientMaterial") |
246 | (materialID === "RadialBlurMaterial") || | ||
247 | (materialID === "PulseMaterial") || | ||
248 | (materialID === "TunnelMaterial") || | ||
249 | (materialID === "TwistMaterial") || | ||
250 | (materialID === "KeleidoscopeMaterial") || | ||
251 | (materialID === "JuliaMaterial") || | ||
252 | (materialID === "MandelMaterial") || | ||
253 | (materialID === "IridescentScalesMaterial") | ||
254 | ) | 244 | ) |
255 | { | 245 | { |
256 | var material = MaterialsLibrary.getMaterial( materialID ); | 246 | var material = MaterialsLibrary.getMaterial( materialID ); |
diff --git a/js/panels/Resizer.js b/js/panels/Resizer.js index 69efd6ac..3afe5d5b 100644 --- a/js/panels/Resizer.js +++ b/js/panels/Resizer.js | |||
@@ -92,7 +92,7 @@ exports.Resizer = Montage.create(Component, { | |||
92 | 92 | ||
93 | handleDblclick: { | 93 | handleDblclick: { |
94 | value : function() { | 94 | value : function() { |
95 | this.panel.addEventListener("webkitTransitionEnd", this, true); | 95 | this.panel.addEventListener("webkitTransitionEnd", this, false); |
96 | if (this.isVertical) { | 96 | if (this.isVertical) { |
97 | this.panel.style.height = ""; | 97 | this.panel.style.height = ""; |
98 | } else { | 98 | } else { |
@@ -102,7 +102,7 @@ exports.Resizer = Montage.create(Component, { | |||
102 | } | 102 | } |
103 | }, | 103 | }, |
104 | 104 | ||
105 | captureWebkitTransitionEnd: { | 105 | handleWebkitTransitionEnd: { |
106 | value: function() { | 106 | value: function() { |
107 | if(this.redrawStage) { | 107 | if(this.redrawStage) { |
108 | this.application.ninja.stage.resizeCanvases = true; | 108 | this.application.ninja.stage.resizeCanvases = true; |
diff --git a/js/panels/Timeline/Collapser.js b/js/panels/Timeline/Collapser.js new file mode 100644 index 00000000..d286d84c --- /dev/null +++ b/js/panels/Timeline/Collapser.js | |||
@@ -0,0 +1,320 @@ | |||
1 | /* | ||
2 | * Collapser: Takes two elements and creates a visual "expando:" clicking on one element expands/collapses the other. | ||
3 | * Required properties: | ||
4 | * clicker: The element that will be clicked on. | ||
5 | * content: The element that will expand or collapse as the clicker is clicked on. | ||
6 | * Optional properties: | ||
7 | * isCollapsed: Is the content collapsed. Set to true on serialization (or initialization) to start content in collapsed state. | ||
8 | * Can be manually set as well. | ||
9 | * collapsibleClass: The CSS class to apply to the content and the clicker when collapsed. Defaults to "collapsible-collapsed". | ||
10 | * isAnimated: Set to true to apply a transition to expand/collapse (defaults to false). | ||
11 | * transitionClass: If isAnimated is set to true, the component will apply transitionClass to the content during the | ||
12 | * collapse process. You can then define transitionClass in your style sheet with the desired CSS transitions. | ||
13 | * Defaults to "collapsible-transition". | ||
14 | * contentHeight: If both isAnimated and isCollapsedAtStart are set to true, set contentHeight to the height of the content | ||
15 | * (in pixels, but without the "px") when not collapsed. If this value is not set, the first time the content is expanded | ||
16 | * the transition will not work. Subsequent collapses (and expansions) will transition as expected. | ||
17 | * isLabelClickable: Boolean that indicates whether or not the clicker should have listener events. Defaults to true; set to | ||
18 | * false for collapsers that will only be operated remotely. | ||
19 | * toggle(): Manually toggle the expand/collapse of the content. | ||
20 | * | ||
21 | */ | ||
22 | var Montage = require("montage/core/core").Montage, | ||
23 | Component = require("montage/ui/component").Component, | ||
24 | Collapser = exports.Collapser = Montage.create(Component, { | ||