aboutsummaryrefslogtreecommitdiff
path: root/js/panels/objects/object.reel/object.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/objects/object.reel/object.js')
-rw-r--r--js/panels/objects/object.reel/object.js101
1 files changed, 101 insertions, 0 deletions
diff --git a/js/panels/objects/object.reel/object.js b/js/panels/objects/object.reel/object.js
new file mode 100644
index 00000000..953c1baf
--- /dev/null
+++ b/js/panels/objects/object.reel/object.js
@@ -0,0 +1,101 @@
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/**
8 @requires montage/core/core
9 @requires montage/ui/component
10 */
11var Montage = require("montage/core/core").Montage,
12 Component = require("montage/ui/component").Component;
13
14exports.Object = Montage.create(Component, {
15 _needsPropertyInspection : { value: null },
16
17 _sourceObject : { value: null },
18 sourceObject : {
19 get: function() {
20 return this._sourceObject;
21 },
22 set: function(object) {
23 if(this._sourceObject === object) { return false; }
24
25 if(object._montage_metadata) {
26 this.montageMetaData = object._montage_metadata;
27 }
28
29 this._needsPropertyInspection = this.needsDraw = true;
30 }
31
32 },
33
34 _identifier : {
35 value: null
36 },
37 identifier : {
38 get: function() {
39 return this._identifier;
40 },
41 set: function(value) {
42 if(this._identifier === value || !value) { return false; }
43
44 this._identifier = value;
45
46 this.label = value;
47
48 this.needsDraw = true;
49 }
50
51 },
52
53 _montageMetaData : {
54 value: null
55 },
56 montageMetaData : {
57 get: function() {
58 return this._montageLabel;
59 },
60 set: function(value) {
61 if(this._montageMetaData === value) { return false; }
62
63 this._montageMetaData = value;
64
65 if(!this.identifier && value.label) {
66 this.label = value.label;
67 this.needsDraw = true;
68 }
69 }
70
71 },
72
73 templateDidLoad: {
74 value: function() {
75 console.log('object loaded');
76 }
77 },
78
79 prepareForDraw : {
80 value: function() {
81
82 }
83 },
84
85 willDraw : {
86 value: function() {
87 if(this._needsPropertyInspection) {
88
89 }
90
91 console.log("This label ", this.label);
92 }
93 },
94
95 draw : {
96 value: function() {
97
98 }
99 }
100
101}); \ No newline at end of file