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 --- .../tools-properties.reel/tools-properties.js | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 js/components/layout/tools-properties.reel/tools-properties.js (limited to 'js/components/layout/tools-properties.reel/tools-properties.js') diff --git a/js/components/layout/tools-properties.reel/tools-properties.js b/js/components/layout/tools-properties.reel/tools-properties.js new file mode 100644 index 00000000..104aabb7 --- /dev/null +++ b/js/components/layout/tools-properties.reel/tools-properties.js @@ -0,0 +1,55 @@ +/* +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; + +exports.ToolsProperties = Montage.create(Component, { + + prepareForDraw: { + enumerable: false, + value: function() { + //this.selectedTool = this.application.toolsData.selectedTool; + } + }, + + draw: { + enumerable: false, + value: function() { + //this.selectionProperties.needsDraw = true; + } + }, + + _currentSelectedTool : { + value: null + }, + + currentSelectedTool : { + get: function() { return this._currentSelectedTool;}, + set: function(value) { + + if(this._currentSelectedTool) { + this[this._currentSelectedTool.properties].visible = false; + } + + if(value) { + this._currentSelectedTool = value; + this[this._currentSelectedTool.properties].visible = true; + + } + + /* + if(this._selectedTool) this[this._selectedTool.properties].visible = false; + + this._selectedTool = value; + this[this._selectedTool.properties].visible = true; + */ + + + } + } + +}); \ No newline at end of file -- cgit v1.2.3