aboutsummaryrefslogtreecommitdiff
path: root/js/components/tools-properties/zoom-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/zoom-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/zoom-properties.reel')
-rw-r--r--js/components/tools-properties/zoom-properties.reel/zoom-properties.css6
-rw-r--r--js/components/tools-properties/zoom-properties.reel/zoom-properties.html40
-rw-r--r--js/components/tools-properties/zoom-properties.reel/zoom-properties.js43
3 files changed, 89 insertions, 0 deletions
diff --git a/js/components/tools-properties/zoom-properties.reel/zoom-properties.css b/js/components/tools-properties/zoom-properties.reel/zoom-properties.css
new file mode 100644
index 00000000..7f1b0f7f
--- /dev/null
+++ b/js/components/tools-properties/zoom-properties.reel/zoom-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/zoom-properties.reel/zoom-properties.html b/js/components/tools-properties/zoom-properties.reel/zoom-properties.html
new file mode 100644
index 00000000..a154bac1
--- /dev/null
+++ b/js/components/tools-properties/zoom-properties.reel/zoom-properties.html
@@ -0,0 +1,40 @@
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="zoom-properties.css">
11
12 <script type="text/montage-serialization">
13 {
14
15 "owner": {
16 "module": "js/components/tools-properties/zoom-properties.reel",
17 "name": "ZoomProperties",
18 "properties": {
19 "element": {"#": "zoomProperties"},
20 "zoomIn": {"#": "zoomInTool"},
21 "zoomOut": {"#": "zoomOutTool"}
22 }
23 }
24 }
25 </script>
26
27 </head>
28
29 <body>
30 <div id="zoomProperties" class="subToolHolderPanel">
31 <div id="zoomToolOptionHolder" class="subToolButton">
32 <input id="zoomInTool" type="radio" name="zoomRadio" class="zoom-option" title="Zoom In"checked/>
33 <input id="zoomOutTool" type="radio" name="zoomRadio" title="Zoom Out" class="zoom-option"/>
34 </div>
35 </div>
36 </body>
37
38</html>
39
40 \ No newline at end of file
diff --git a/js/components/tools-properties/zoom-properties.reel/zoom-properties.js b/js/components/tools-properties/zoom-properties.reel/zoom-properties.js
new file mode 100644
index 00000000..b8d6eb6b
--- /dev/null
+++ b/js/components/tools-properties/zoom-properties.reel/zoom-properties.js
@@ -0,0 +1,43 @@
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;
8var Component = require("montage/ui/component").Component;
9var ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties;
10
11exports.ZoomProperties = Montage.create(ToolProperties, {
12
13 zoomIn: { value: null },
14 zoomOut: { value: null },
15 zoomInCursor:{value:"url('images/cursors/zoom.png'), default"},
16 zoomOutCursor:{value:"url('images/cursors/zoom_minus.png'), default"},
17 _subPrepare: {
18 value: function() {
19 this.zoomIn.addEventListener("click", this, false);
20 this.zoomOut.addEventListener("click", this, false);
21 }
22 },
23
24 handleClick: {
25 value: function(event) {
26 this.selectedElement = event._event.target.id;
27 if(this.selectedElement==="zoomInTool"){
28 this.application.ninja.stage.drawingCanvas.style.cursor = this.zoomInCursor;
29 }else{
30 this.application.ninja.stage.drawingCanvas.style.cursor = this.zoomOutCursor;
31 }
32 }
33 },
34
35 _selectedElement: {
36 value: "zoomInTool", enumerable: false
37 },
38
39 selectedElement: {
40 get: function() { return this._selectedElement;},
41 set: function(value) { this._selectedElement = value; }
42 }
43}); \ No newline at end of file