diff options
author | Pierre Frisch | 2011-12-22 07:25:50 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-01-27 11:18:17 -0800 |
commit | b89a7ee8b956c96a1dcee995ea840feddc5d4b27 (patch) | |
tree | 0f3136ab0ecdbbbed6a83576581af0a53124d6f1 /js/components/tools-properties/tool-properties.js | |
parent | 2401f05d1f4b94d45e4568b81fc73e67b969d980 (diff) | |
download | ninja-b89a7ee8b956c96a1dcee995ea840feddc5d4b27.tar.gz |
First commit of Ninja to ninja-internal
Signed-off-by: Valerio Virgillito <rmwh84@motorola.com>
Diffstat (limited to 'js/components/tools-properties/tool-properties.js')
-rw-r--r-- | js/components/tools-properties/tool-properties.js | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/js/components/tools-properties/tool-properties.js b/js/components/tools-properties/tool-properties.js new file mode 100644 index 00000000..06ebccd8 --- /dev/null +++ b/js/components/tools-properties/tool-properties.js | |||
@@ -0,0 +1,47 @@ | |||
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 | |||
10 | exports.ToolProperties = Montage.create(Component, { | ||
11 | |||
12 | _visible: { | ||
13 | value: false, enumerable: false | ||
14 | }, | ||
15 | |||
16 | visible: { | ||
17 | get: function() { return this._visible;}, | ||
18 | set: function(value) { this._visible = value; this.needsDraw = true;} | ||
19 | }, | ||
20 | |||
21 | prepareForDraw: { | ||
22 | enumerable: false, | ||
23 | value: function() { | ||
24 | this.element.style.display = "none"; | ||
25 | |||
26 | this._subPrepare(); | ||
27 | } | ||
28 | }, | ||
29 | |||
30 | _subPrepare: { | ||
31 | value: function() { /* Overwrite this in the child */ } | ||
32 | }, | ||
33 | |||
34 | draw: { | ||
35 | enumerable: false, | ||
36 | value: function() { | ||
37 | if(this.visible) { | ||
38 | this.element.style.display = ""; | ||
39 | } else { | ||
40 | this.element.style.display = "none"; | ||
41 | } | ||
42 | } | ||
43 | } | ||
44 | |||
45 | |||
46 | |||
47 | }); \ No newline at end of file | ||