aboutsummaryrefslogtreecommitdiff
path: root/js/panels/binding/binding-item.reel/binding-item.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/binding/binding-item.reel/binding-item.js')
-rw-r--r--js/panels/binding/binding-item.reel/binding-item.js88
1 files changed, 88 insertions, 0 deletions
diff --git a/js/panels/binding/binding-item.reel/binding-item.js b/js/panels/binding/binding-item.reel/binding-item.js
new file mode 100644
index 00000000..bda62ef3
--- /dev/null
+++ b/js/panels/binding/binding-item.reel/binding-item.js
@@ -0,0 +1,88 @@
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
7var Montage = require("montage/core/core").Montage,
8 Component = require("montage/ui/component").Component;
9
10
11exports.BindingItem = Montage.create(Component, {
12 sourceObjectLabel : { value: null },
13 boundObjectLabel : { value: null },
14
15 _sourceObject : { value: null },
16 sourceObject : {
17 get: function() {
18 return this._sourceObject;
19 },
20 set: function(value) {
21 if(value === this._sourceObject) { return; }
22
23 this.sourceObjectLabel = value.identifier;
24
25 this._sourceObject = value;
26 }
27 },
28 _boundObject : { value: null },
29 boundObject : {
30 get: function() {
31 return this._boundObject;
32 },
33 set: function(value) {
34 if(value === this._boundObject) { return; }
35
36 this.boundObjectLabel = value.identifier;
37
38 this._boundObject = value;
39 }
40 },
41
42 _sourceObjectPropertyPath : { value: null },
43 sourceObjectPropertyPath : {
44 get: function() {
45 return this._sourceObjectPropertyPath;
46 },
47 set: function(value) {
48 if(value === this._sourceObjectPropertyPath) { return; }
49 this._sourceObjectPropertyPath = value;
50 this.needsDraw = true;
51 }
52 },
53 _boundObjectPropertyPath : { value: null },
54 boundObjectPropertyPath : {
55 get: function() {
56 return this._boundObjectPropertyPath;
57 },
58 set: function(value) {
59 if(value === this._boundObjectPropertyPath) { return; }
60 this._boundObjectPropertyPath = value;
61 this.needsDraw = true;
62 }
63 },
64
65 _oneway : { value: null },
66 oneway : {
67 get: function() {
68 return this._oneway;
69 },
70 set: function(value) {
71 if(value === this._oneway) { return; }
72 this._oneway = value;
73 this.needsDraw = true;
74 }
75 },
76
77 templateDidLoad : {
78 value: function() {
79 console.log("loaded binding item");
80 }
81 },
82
83 prepareForDraw: {
84 value: function() {
85 console.log("preparing to draw binding item");
86 }
87 }
88}); \ No newline at end of file