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 --- .../layout/tools-list.reel/tools-list.css | 9 ++ .../layout/tools-list.reel/tools-list.html | 174 +++++++++++++++++++++ js/components/layout/tools-list.reel/tools-list.js | 87 +++++++++++ 3 files changed, 270 insertions(+) create mode 100644 js/components/layout/tools-list.reel/tools-list.css create mode 100644 js/components/layout/tools-list.reel/tools-list.html create mode 100644 js/components/layout/tools-list.reel/tools-list.js (limited to 'js/components/layout/tools-list.reel') diff --git a/js/components/layout/tools-list.reel/tools-list.css b/js/components/layout/tools-list.reel/tools-list.css new file mode 100644 index 00000000..c58397e2 --- /dev/null +++ b/js/components/layout/tools-list.reel/tools-list.css @@ -0,0 +1,9 @@ +/* + 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. +
*/ + +.toolsList { + padding-top:15px; +} \ No newline at end of file diff --git a/js/components/layout/tools-list.reel/tools-list.html b/js/components/layout/tools-list.reel/tools-list.html new file mode 100644 index 00000000..e12fd59b --- /dev/null +++ b/js/components/layout/tools-list.reel/tools-list.html @@ -0,0 +1,174 @@ + + + + + + + + + + + +
+
+
+
+ +
+
+
+ + + + diff --git a/js/components/layout/tools-list.reel/tools-list.js b/js/components/layout/tools-list.reel/tools-list.js new file mode 100644 index 00000000..e26ab391 --- /dev/null +++ b/js/components/layout/tools-list.reel/tools-list.js @@ -0,0 +1,87 @@ +/* +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.ToolsList = Montage.create(Component, { + + SelectionTool: { value: null }, + SubselectionTool: { value: null }, + Rotate3DTool: { value: null }, + Translate3DTool: { value: null }, + TagTool: { value: null }, + PenTool: { value: null }, + TextTool: { value: null }, + ShapeTool: { value: null }, + OvalTool: { value: null }, + RectTool: { value: null }, + LineTool: { value: null }, + PencilTool: { value: null }, + BrushTool: { value: null }, + FillTool: { value: null }, + InkBottleTool: { value: null }, + EyedropperTool: { value: null }, + EraserTool: { value: null }, + RotateStageTool3D: { value: null }, + PanTool: { value: null }, + ZoomTool: { value: null }, + + prepareForDraw: { + enumerable: false, + value: function() { + this.PenTool.options = this.application.ninja.toolsProperties.shapeProperties.lineProperties;//this.application.Ninja.toolsProperties.penProperties; + + this.SelectionTool.options = this.application.ninja.toolsProperties.selectionProperties; + this.SubselectionTool.options = this.application.ninja.toolsProperties.subSelectionProperties; + + this.Rotate3DTool.options = this.application.ninja.toolsProperties.rotate3DProperties; + this.TagTool.options = this.application.ninja.toolsProperties.tagProperties; + this.PenTool.options = this.application.ninja.toolsProperties.penProperties; + this.TextTool.options = this.application.ninja.toolsProperties.textProperties; + + this.FillTool.options = this.application.ninja.toolsProperties.fillProperties; + this.InkBottleTool.options = this.application.ninja.toolsProperties.inkbottleProperties; + + this.ShapeTool.options = this.application.ninja.toolsProperties.shapeProperties; + this.OvalTool.options = this.application.ninja.toolsProperties.shapeProperties.ovalProperties; + this.RectTool.options = this.application.ninja.toolsProperties.shapeProperties.rectProperties; + this.LineTool.options = this.application.ninja.toolsProperties.shapeProperties.lineProperties; + this.PencilTool.options = this.application.ninja.toolsProperties.pencilProperties; + this.BrushTool.options = this.application.ninja.toolsProperties.brushProperties; + + this.EyedropperTool.options = this.application.ninja.toolsProperties.eyedropperProperties; + this.EraserTool.options = this.application.ninja.toolsProperties.eraserProperties; + this.RotateStageTool3D.options = this.application.ninja.toolsProperties.rotateStageProperties; + this.PanTool.options = this.application.ninja.toolsProperties.panProperties; + this.ZoomTool.options = this.application.ninja.toolsProperties.zoomProperties; + + } + }, + + action: { + value: function(value, args) { + if(this.application.toolsData.selectedTool.container) { + this[this.application.toolsData.selectedTool.subtools[this.application.toolsData._selectedSubToolIndex].action][value](args); + } else { + this[this.application.toolsData.selectedTool.action][value](args); + } + + } + }, + + prop: { + value: function(value, args) { + if(this.application.toolsData.selectedTool.container) { + return this[this.application.toolsData.selectedTool.subtools[this.application.toolsData._selectedSubToolIndex].action][value]; + } else { + return this[this.application.toolsData.selectedTool.action][value]; + } + + } + } + +}); \ No newline at end of file -- cgit v1.2.3