diff options
Diffstat (limited to 'js/components/layout/tools-list.reel/tools-list.js')
-rw-r--r-- | js/components/layout/tools-list.reel/tools-list.js | 87 |
1 files changed, 87 insertions, 0 deletions
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 @@ | |||
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 | |||
10 | exports.ToolsList = Montage.create(Component, { | ||
11 | |||
12 | SelectionTool: { value: null }, | ||
13 | SubselectionTool: { value: null }, | ||
14 | Rotate3DTool: { value: null }, | ||
15 | Translate3DTool: { value: null }, | ||
16 | TagTool: { value: null }, | ||
17 | PenTool: { value: null }, | ||
18 | TextTool: { value: null }, | ||
19 | ShapeTool: { value: null }, | ||
20 | OvalTool: { value: null }, | ||
21 | RectTool: { value: null }, | ||
22 | LineTool: { value: null }, | ||
23 | PencilTool: { value: null }, | ||
24 | BrushTool: { value: null }, | ||
25 | FillTool: { value: null }, | ||
26 | InkBottleTool: { value: null }, | ||
27 | EyedropperTool: { value: null }, | ||
28 | EraserTool: { value: null }, | ||
29 | RotateStageTool3D: { value: null }, | ||
30 | PanTool: { value: null }, | ||
31 | ZoomTool: { value: null }, | ||
32 | |||
33 | prepareForDraw: { | ||
34 | enumerable: false, | ||
35 | value: function() { | ||
36 | this.PenTool.options = this.application.ninja.toolsProperties.shapeProperties.lineProperties;//this.application.Ninja.toolsProperties.penProperties; | ||
37 | |||
38 | this.SelectionTool.options = this.application.ninja.toolsProperties.selectionProperties; | ||
39 | this.SubselectionTool.options = this.application.ninja.toolsProperties.subSelectionProperties; | ||
40 | |||
41 | this.Rotate3DTool.options = this.application.ninja.toolsProperties.rotate3DProperties; | ||
42 | this.TagTool.options = this.application.ninja.toolsProperties.tagProperties; | ||
43 | this.PenTool.options = this.application.ninja.toolsProperties.penProperties; | ||
44 | this.TextTool.options = this.application.ninja.toolsProperties.textProperties; | ||
45 | |||
46 | this.FillTool.options = this.application.ninja.toolsProperties.fillProperties; | ||
47 | this.InkBottleTool.options = this.application.ninja.toolsProperties.inkbottleProperties; | ||
48 | |||
49 | this.ShapeTool.options = this.application.ninja.toolsProperties.shapeProperties; | ||
50 | this.OvalTool.options = this.application.ninja.toolsProperties.shapeProperties.ovalProperties; | ||
51 | this.RectTool.options = this.application.ninja.toolsProperties.shapeProperties.rectProperties; | ||
52 | this.LineTool.options = this.application.ninja.toolsProperties.shapeProperties.lineProperties; | ||
53 | this.PencilTool.options = this.application.ninja.toolsProperties.pencilProperties; | ||
54 | this.BrushTool.options = this.application.ninja.toolsProperties.brushProperties; | ||
55 | |||
56 | this.EyedropperTool.options = this.application.ninja.toolsProperties.eyedropperProperties; | ||
57 | this.EraserTool.options = this.application.ninja.toolsProperties.eraserProperties; | ||
58 | this.RotateStageTool3D.options = this.application.ninja.toolsProperties.rotateStageProperties; | ||
59 | this.PanTool.options = this.application.ninja.toolsProperties.panProperties; | ||
60 | this.ZoomTool.options = this.application.ninja.toolsProperties.zoomProperties; | ||
61 | |||
62 | } | ||
63 | }, | ||
64 | |||
65 | action: { | ||
66 | value: function(value, args) { | ||
67 | if(this.application.toolsData.selectedTool.container) { | ||
68 | this[this.application.toolsData.selectedTool.subtools[this.application.toolsData._selectedSubToolIndex].action][value](args); | ||
69 | } else { | ||
70 | this[this.application.toolsData.selectedTool.action][value](args); | ||
71 | } | ||
72 | |||
73 | } | ||
74 | }, | ||
75 | |||
76 | prop: { | ||
77 | value: function(value, args) { | ||
78 | if(this.application.toolsData.selectedTool.container) { | ||
79 | return this[this.application.toolsData.selectedTool.subtools[this.application.toolsData._selectedSubToolIndex].action][value]; | ||
80 | } else { | ||
81 | return this[this.application.toolsData.selectedTool.action][value]; | ||
82 | } | ||
83 | |||
84 | } | ||
85 | } | ||
86 | |||
87 | }); \ No newline at end of file | ||