diff options
author | Nivesh Rajbhandari | 2012-03-27 09:32:53 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-03-27 09:32:53 -0700 |
commit | 406bbfc63f8ed42d7da105dbd068a49ff8fb5f09 (patch) | |
tree | 3a8b45f4802f002269ff1bcf596f94cee4679a07 /node_modules/montage/examples/feed-reader/main.reel/main.js | |
parent | bda9f8f5829c943486f8850e68c991e83f8fb8c8 (diff) | |
parent | 309dde5a8c4599cef6a1052c1ff9ee1ad8ec5858 (diff) | |
download | ninja-406bbfc63f8ed42d7da105dbd068a49ff8fb5f09.tar.gz |
Merge branch 'refs/heads/ninja-internal' into WebGLMaterials
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'node_modules/montage/examples/feed-reader/main.reel/main.js')
-rw-r--r-- | node_modules/montage/examples/feed-reader/main.reel/main.js | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/node_modules/montage/examples/feed-reader/main.reel/main.js b/node_modules/montage/examples/feed-reader/main.reel/main.js new file mode 100644 index 00000000..06d8fdba --- /dev/null +++ b/node_modules/montage/examples/feed-reader/main.reel/main.js | |||
@@ -0,0 +1,55 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
5 | </copyright> */ | ||
6 | var Montage = require("montage/core/core").Montage, | ||
7 | Component = require("montage/ui/component").Component; | ||
8 | |||
9 | exports.Main = Montage.create(Component, { | ||
10 | |||
11 | feedURL: { | ||
12 | value: 'http://rss.cnn.com/rss/cnn_mostpopular.rss', | ||
13 | distinct: true | ||
14 | }, | ||
15 | |||
16 | mapCategory: { | ||
17 | get: function() { | ||
18 | return this._mapCategory; | ||
19 | }, | ||
20 | set: function(value) { | ||
21 | this._mapCategory = value; | ||
22 | this.map.category = value; | ||
23 | } | ||
24 | }, | ||
25 | |||
26 | feedReader: {value: null}, | ||
27 | |||
28 | map: {value: null}, | ||
29 | |||
30 | mapCenter: {value: null}, | ||
31 | |||
32 | handleGoAction: { | ||
33 | value: function(event) { | ||
34 | event.preventDefault(); | ||
35 | this.feedReader.feedURL = this.feedURL; | ||
36 | |||
37 | } | ||
38 | }, | ||
39 | |||
40 | handleMapButtonAction: { | ||
41 | value: function(event) { | ||
42 | event.preventDefault(); | ||
43 | this.map.center = this.mapCenter; | ||
44 | } | ||
45 | }, | ||
46 | |||
47 | draw: { | ||
48 | value: function() { | ||
49 | if(this.mapCenter != null) { | ||
50 | this.map.center = this.mapCenter; | ||
51 | } | ||
52 | } | ||
53 | } | ||
54 | |||
55 | }); | ||