diff options
author | Nivesh Rajbhandari | 2012-02-07 09:36:29 -0800 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-02-07 09:36:29 -0800 |
commit | 789eaf5a92c903f27462c69a8890fbec695ab14e (patch) | |
tree | 1f1f30d8f7c5fbfda4e12af95f7d1bbc8b8bc6c0 /js/components/treeview/leaf.reel/leaf.js | |
parent | 92ae17bc800cf82cdbd1482ef1af1a5fd7bd632a (diff) | |
parent | 8950b342d1eda8bfa195372e1c17363a409651cd (diff) | |
download | ninja-789eaf5a92c903f27462c69a8890fbec695ab14e.tar.gz |
Merge branch 'refs/heads/ninja-internal' into ToolFixes
Diffstat (limited to 'js/components/treeview/leaf.reel/leaf.js')
-rw-r--r-- | js/components/treeview/leaf.reel/leaf.js | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/js/components/treeview/leaf.reel/leaf.js b/js/components/treeview/leaf.reel/leaf.js new file mode 100644 index 00000000..3a63f5ed --- /dev/null +++ b/js/components/treeview/leaf.reel/leaf.js | |||
@@ -0,0 +1,44 @@ | |||
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 | |||
7 | var Montage = require("montage/core/core").Montage, | ||
8 | Component = require("montage/ui/component").Component; | ||
9 | TreeNode = require("js/components/treeview/tree-node").TreeNode; | ||
10 | |||
11 | exports.Leaf = Montage.create(TreeNode, { | ||
12 | hasTemplate: { | ||
13 | value: true | ||
14 | }, | ||
15 | deserializedFromTemplate : { | ||
16 | value: function() { | ||
17 | //console.log('Leaf deserialized.'); | ||
18 | } | ||
19 | }, | ||
20 | templateDidLoad : { | ||
21 | value: function() { | ||
22 | //debugger; | ||
23 | console.log('Leaf\'s template did load.'); | ||
24 | this.needsDraw = true; | ||
25 | } | ||
26 | }, | ||
27 | prepareForDraw: { | ||
28 | value : function() { | ||
29 | console.log('Leafs prepare for draw.', this.labelKey); | ||
30 | } | ||
31 | }, | ||
32 | draw : { | ||
33 | value : function() { | ||
34 | if(this.sourceObject[this.labelKey]) { | ||
35 | this._labelText = this.sourceObject[this.labelKey]; | ||
36 | } else { | ||
37 | console.log("Label key unknown"); | ||
38 | } | ||
39 | |||
40 | } | ||
41 | } | ||
42 | |||
43 | |||
44 | }); | ||