diff options
author | Benoit Marchant | 2012-03-17 17:41:47 -0700 |
---|---|---|
committer | François Frisch | 2012-03-17 17:41:47 -0700 |
commit | 28a7a71d2962158cab34f50627f2d22540c29eab (patch) | |
tree | dab3e0682ee3b55e74fda1f582e91d3f7937f7ef /node_modules/montage/ui/google/picasa-carousel.reel/image.reel | |
parent | bcddcf118d4ce93e8a2519ed455c6e25a701ce74 (diff) | |
download | ninja-28a7a71d2962158cab34f50627f2d22540c29eab.tar.gz |
Added a new picasa-carousel component as well as an example using it
Diffstat (limited to 'node_modules/montage/ui/google/picasa-carousel.reel/image.reel')
-rw-r--r-- | node_modules/montage/ui/google/picasa-carousel.reel/image.reel/image.html | 37 | ||||
-rw-r--r-- | node_modules/montage/ui/google/picasa-carousel.reel/image.reel/image.js | 20 |
2 files changed, 57 insertions, 0 deletions
diff --git a/node_modules/montage/ui/google/picasa-carousel.reel/image.reel/image.html b/node_modules/montage/ui/google/picasa-carousel.reel/image.reel/image.html new file mode 100644 index 00000000..e3d9c7a2 --- /dev/null +++ b/node_modules/montage/ui/google/picasa-carousel.reel/image.reel/image.html | |||
@@ -0,0 +1,37 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <!-- <copyright> | ||
3 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
4 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
5 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
6 | </copyright> --> | ||
7 | <html> | ||
8 | <head> | ||
9 | <script type="text/montage-serialization"> | ||
10 | { | ||
11 | "owner": { | ||
12 | "module": "montage/ui/google/picasa-carousel.reel/image.reel", | ||
13 | "name": "Image", | ||
14 | "properties": { | ||
15 | "element": {"#": "Image"} | ||
16 | } | ||
17 | } | ||
18 | } | ||
19 | </script> | ||
20 | </head> | ||
21 | <style> | ||
22 | .Image { | ||
23 | /* | ||
24 | margin-top: -160px; | ||
25 | margin-left: -160px; | ||
26 | */ | ||
27 | width: 320px; | ||
28 | height: 320px; | ||
29 | border-radius: 18px; | ||
30 | background-repeat: no-repeat; | ||
31 | background-size: cover; | ||
32 | } | ||
33 | </style> | ||
34 | <body> | ||
35 | <div id="Image" class="Image"></div> | ||
36 | </body> | ||
37 | </html> | ||
diff --git a/node_modules/montage/ui/google/picasa-carousel.reel/image.reel/image.js b/node_modules/montage/ui/google/picasa-carousel.reel/image.reel/image.js new file mode 100644 index 00000000..0bced41b --- /dev/null +++ b/node_modules/montage/ui/google/picasa-carousel.reel/image.reel/image.js | |||
@@ -0,0 +1,20 @@ | |||
1 | var Montage = require("montage").Montage, | ||
2 | Component = require("ui/component").Component; | ||
3 | |||
4 | var Image = exports.Image = Montage.create(Component, { | ||
5 | |||
6 | _src: {value: null}, | ||
7 | |||
8 | src: { | ||
9 | set: function(value) { | ||
10 | this._src = value; | ||
11 | this.needsDraw = true; | ||
12 | } | ||
13 | }, | ||
14 | |||
15 | draw: { | ||
16 | value: function() { | ||
17 | this._element.style.backgroundImage = "url(" + this._src + ")"; | ||
18 | } | ||
19 | } | ||
20 | }); | ||