diff options
Diffstat (limited to 'js/components/tools-properties/zoom-properties.reel/zoom-properties.js')
-rw-r--r-- | js/components/tools-properties/zoom-properties.reel/zoom-properties.js | 43 |
1 files changed, 43 insertions, 0 deletions
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> | ||
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.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 | ||