aboutsummaryrefslogtreecommitdiff
path: root/js/components/tools-properties/fill-properties.reel
diff options
context:
space:
mode:
authorPierre Frisch2011-12-22 07:25:50 -0800
committerValerio Virgillito2012-01-27 11:18:17 -0800
commitb89a7ee8b956c96a1dcee995ea840feddc5d4b27 (patch)
tree0f3136ab0ecdbbbed6a83576581af0a53124d6f1 /js/components/tools-properties/fill-properties.reel
parent2401f05d1f4b94d45e4568b81fc73e67b969d980 (diff)
downloadninja-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/fill-properties.reel')
-rw-r--r--js/components/tools-properties/fill-properties.reel/fill-properties.css6
-rw-r--r--js/components/tools-properties/fill-properties.reel/fill-properties.html42
-rw-r--r--js/components/tools-properties/fill-properties.reel/fill-properties.js38
3 files changed, 86 insertions, 0 deletions
diff --git a/js/components/tools-properties/fill-properties.reel/fill-properties.css b/js/components/tools-properties/fill-properties.reel/fill-properties.css
new file mode 100644
index 00000000..7f1b0f7f
--- /dev/null
+++ b/js/components/tools-properties/fill-properties.reel/fill-properties.css
@@ -0,0 +1,6 @@
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
diff --git a/js/components/tools-properties/fill-properties.reel/fill-properties.html b/js/components/tools-properties/fill-properties.reel/fill-properties.html
new file mode 100644
index 00000000..d09b7f44
--- /dev/null
+++ b/js/components/tools-properties/fill-properties.reel/fill-properties.html
@@ -0,0 +1,42 @@
1<!DOCTYPE HTML>
2<!-- <copyright>
3 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
4 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
5 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
6 </copyright> -->
7<html>
8 <head>
9 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
10 <link rel="stylesheet" type="text/css" href="fill-properties.css">
11
12 <script type="text/montage-serialization">
13 {
14 "owner": {
15 "module": "js/components/tools-properties/fill-properties.reel",
16 "name": "FillProperties",
17 "properties": {
18 "element": {"#": "fillProperties"},
19 "_useWebGL": {"#": "useWebGLCH"},
20 "_materialsContainer": {"#": "materialsContainer"},
21 "_fillMaterial": {"#": "fillMaterialCB"}
22 }
23 }
24 }
25 </script>
26
27 </head>
28
29 <body>
30 <div id="fillProperties" class="subToolHolderPanel">
31 <label class="label subOption"><input id="useWebGLCH" type="checkbox" name="useWebGLControl" class="checkBoxAlign"/> Use WebGL</label>
32
33 <div id="materialsContainer" class="leftLabel" style="padding-top: 3px;">
34 <label class="label"> Materials:</label>
35 <div id="fillIcon" class="bucketToolUp" style="float: left;"></div>
36 <select id="fillMaterialCB" class="nj-skinned">
37 </select>
38 </div>
39 </div>
40 </body>
41
42</html> \ No newline at end of file
diff --git a/js/components/tools-properties/fill-properties.reel/fill-properties.js b/js/components/tools-properties/fill-properties.reel/fill-properties.js
new file mode 100644
index 00000000..3b77d72e
--- /dev/null
+++ b/js/components/tools-properties/fill-properties.reel/fill-properties.js
@@ -0,0 +1,38 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No 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 ShapesController = require("js/controllers/elements/shapes-controller").ShapesController,
9 ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties;
10
11exports.FillProperties = Montage.create(ToolProperties, {
12
13 _use3D: { value: false },
14
15 _subPrepare: {
16 value: function() {
17 ShapesController.DisplayMaterials(this._fillMaterial);
18
19 this.handleChange(null);
20 this._useWebGL.addEventListener("change", this, false);
21 }
22 },
23
24 handleChange: {
25 value: function(event) {
26 if(this._useWebGL.checked)
27 {
28 this._use3D = true;
29 this._materialsContainer.style["display"] = "";
30 }
31 else
32 {
33 this._use3D = false;
34 this._materialsContainer.style["display"] = "none";
35 }
36 }
37 }
38}); \ No newline at end of file