diff options
author | Nivesh Rajbhandari | 2012-04-18 12:08:46 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-04-18 12:08:46 -0700 |
commit | fb20a74856a8c272d09d106765eb2e44c883f0c3 (patch) | |
tree | d41468b2fff52d73c6308de9730c17be05a71394 /js/models/element-model.js | |
parent | e2510cba3b75bba78c587d784f39c137c1618369 (diff) | |
parent | 616a8532099fec2a15855eac97cd85cb60c4451c (diff) | |
download | ninja-fb20a74856a8c272d09d106765eb2e44c883f0c3.tar.gz |
Merge branch 'refs/heads/ninja-internal' into EricMerge
Conflicts:
js/tools/Rotate3DToolBase.js
js/tools/RotateStage3DTool.js
js/tools/Translate3DToolBase.js
js/tools/modifier-tool-base.js
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/models/element-model.js')
-rwxr-xr-x | js/models/element-model.js | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/js/models/element-model.js b/js/models/element-model.js index 831e8b1e..fa02fd38 100755 --- a/js/models/element-model.js +++ b/js/models/element-model.js | |||
@@ -7,6 +7,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
7 | var Montage = require("montage/core/core").Montage; | 7 | var Montage = require("montage/core/core").Montage; |
8 | 8 | ||
9 | exports.ElementModel = Montage.create(Montage, { | 9 | exports.ElementModel = Montage.create(Montage, { |
10 | key: { value: "_model_"}, | ||
10 | 11 | ||
11 | type: { value: null }, // Tag type that was created | 12 | type: { value: null }, // Tag type that was created |
12 | selection: { value: null }, // Selection string | 13 | selection: { value: null }, // Selection string |
@@ -43,6 +44,39 @@ exports.ElementModel = Montage.create(Montage, { | |||
43 | * Color info | 44 | * Color info |
44 | */ | 45 | */ |
45 | fill: { value: null }, | 46 | fill: { value: null }, |
46 | stroke: { value: null } | 47 | stroke: { value: null }, |
48 | |||
49 | getProperty: { | ||
50 | value: function(property) { | ||
51 | var key = this.key + property; | ||
52 | |||
53 | if(!this.hasOwnProperty(key)) { | ||
54 | this.defineModelProperty(key, null); | ||
55 | } | ||
56 | |||
57 | return this[key]; | ||
58 | } | ||
59 | }, | ||
60 | |||
61 | setProperty: { | ||
62 | value: function(property, value) { | ||
63 | var key = this.key + property; | ||
64 | |||
65 | if(!this.hasOwnProperty(key)) { | ||
66 | this.defineModelProperty(key, value); | ||
67 | } else { | ||
68 | this[key] = value; | ||
69 | } | ||
70 | } | ||
71 | }, | ||
72 | |||
73 | defineModelProperty: { | ||
74 | value: function(property, value) { | ||
75 | Montage.defineProperty(this, property, { | ||
76 | enumarable: true, | ||
77 | value:value | ||
78 | }); | ||
79 | } | ||
80 | } | ||
47 | 81 | ||
48 | }); \ No newline at end of file | 82 | }); \ No newline at end of file |