From b89a7ee8b956c96a1dcee995ea840feddc5d4b27 Mon Sep 17 00:00:00 2001 From: Pierre Frisch Date: Thu, 22 Dec 2011 07:25:50 -0800 Subject: First commit of Ninja to ninja-internal Signed-off-by: Valerio Virgillito --- .../zoom-properties.reel/zoom-properties.css | 6 +++ .../zoom-properties.reel/zoom-properties.html | 40 ++++++++++++++++++++ .../zoom-properties.reel/zoom-properties.js | 43 ++++++++++++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 js/components/tools-properties/zoom-properties.reel/zoom-properties.css create mode 100644 js/components/tools-properties/zoom-properties.reel/zoom-properties.html create mode 100644 js/components/tools-properties/zoom-properties.reel/zoom-properties.js (limited to 'js/components/tools-properties/zoom-properties.reel') 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 @@ +/* + This file contains proprietary software owned by Motorola Mobility, Inc.
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
*/ + 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 @@ + + + + + + + + + + + + +
+
+ + +
+
+ + + + + \ 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 @@ +/* +This file contains proprietary software owned by Motorola Mobility, Inc.
+No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
*/ + +var Montage = require("montage/core/core").Montage; +var Component = require("montage/ui/component").Component; +var ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties; + +exports.ZoomProperties = Montage.create(ToolProperties, { + + zoomIn: { value: null }, + zoomOut: { value: null }, + zoomInCursor:{value:"url('images/cursors/zoom.png'), default"}, + zoomOutCursor:{value:"url('images/cursors/zoom_minus.png'), default"}, + _subPrepare: { + value: function() { + this.zoomIn.addEventListener("click", this, false); + this.zoomOut.addEventListener("click", this, false); + } + }, + + handleClick: { + value: function(event) { + this.selectedElement = event._event.target.id; + if(this.selectedElement==="zoomInTool"){ + this.application.ninja.stage.drawingCanvas.style.cursor = this.zoomInCursor; + }else{ + this.application.ninja.stage.drawingCanvas.style.cursor = this.zoomOutCursor; + } + } + }, + + _selectedElement: { + value: "zoomInTool", enumerable: false + }, + + selectedElement: { + get: function() { return this._selectedElement;}, + set: function(value) { this._selectedElement = value; } + } +}); \ No newline at end of file -- cgit v1.2.3