diff options
Diffstat (limited to 'js/components/tools-properties/tag-properties.reel/tag-properties.js')
-rw-r--r-- | js/components/tools-properties/tag-properties.reel/tag-properties.js | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.js b/js/components/tools-properties/tag-properties.reel/tag-properties.js new file mode 100644 index 00000000..1caabc35 --- /dev/null +++ b/js/components/tools-properties/tag-properties.reel/tag-properties.js | |||
@@ -0,0 +1,57 @@ | |||
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 | var Component = require("montage/ui/component").Component; | ||
9 | var ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties; | ||
10 | |||
11 | exports.TagProperties = Montage.create(ToolProperties, { | ||
12 | divElement: { value: null, enumerable: false }, | ||
13 | imageElement: { value: null, enumerable: false }, | ||
14 | videoElement: { value: null, enumerable: false }, | ||
15 | canvasElement: { value: null, enumerable: false }, | ||
16 | customElement: { value: null, enumerable: false }, | ||
17 | classField: { value: null, enumerable: false }, | ||
18 | customName: { value: null, enumerable: false }, | ||
19 | customLabel: { value: null, enumerable: false }, | ||
20 | |||
21 | _subPrepare: { | ||
22 | value: function() { | ||
23 | this.customName.style["display"] = "none"; | ||
24 | this.customLabel.style["display"] = "none"; | ||
25 | |||
26 | this.divElement.addEventListener("click", this, false); | ||
27 | this.imageElement.addEventListener("click", this, false); | ||
28 | this.videoElement.addEventListener("click", this, false); | ||
29 | this.canvasElement.addEventListener("click", this, false); | ||
30 | this.customElement.addEventListener("click", this, false); | ||
31 | } | ||
32 | }, | ||
33 | |||
34 | handleClick: { | ||
35 | value: function(event) { | ||
36 | this.selectedElement = event._event.target.id; | ||
37 | |||
38 | if(this.selectedElement === "customTool") { | ||
39 | this.customName.style["display"] = ""; | ||
40 | this.customLabel.style["display"] = ""; | ||
41 | } else { | ||
42 | this.customName.style["display"] = "none"; | ||
43 | this.customLabel.style["display"] = "none"; | ||
44 | } | ||
45 | } | ||
46 | }, | ||
47 | |||
48 | _selectedElement: { | ||
49 | value: "divTool", enumerable: false | ||
50 | }, | ||
51 | |||
52 | selectedElement: { | ||
53 | get: function() { return this._selectedElement;}, | ||
54 | set: function(value) { this._selectedElement = value; } | ||
55 | } | ||
56 | |||
57 | }); \ No newline at end of file | ||