aboutsummaryrefslogtreecommitdiff
path: root/js/components/layout/tools-list.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/components/layout/tools-list.reel')
-rwxr-xr-xjs/components/layout/tools-list.reel/tools-list.html19
-rwxr-xr-xjs/components/layout/tools-list.reel/tools-list.js17
2 files changed, 33 insertions, 3 deletions
diff --git a/js/components/layout/tools-list.reel/tools-list.html b/js/components/layout/tools-list.reel/tools-list.html
index 2c5617e5..5996e446 100755
--- a/js/components/layout/tools-list.reel/tools-list.html
+++ b/js/components/layout/tools-list.reel/tools-list.html
@@ -136,6 +136,21 @@
136 "name": "ZoomTool" 136 "name": "ZoomTool"
137 }, 137 },
138 138
139 "disable": {
140 "module": "montage/ui/condition.reel",
141 "name": "Condition",
142 "properties": {
143 "element": {"#": "disabledCondition"}
144 },
145 "bindings": {
146 "condition": {
147 "boundObject": {"@": "owner"},
148 "boundObjectPropertyPath": "disabled",
149 "oneway": true
150 }
151 }
152 },
153
139 "owner": { 154 "owner": {
140 "module": "js/components/layout/tools-list.reel", 155 "module": "js/components/layout/tools-list.reel",
141 "name": "ToolsList", 156 "name": "ToolsList",
@@ -166,9 +181,6 @@
166 ] 181 ]
167 } 182 }
168 } 183 }
169
170
171
172 } 184 }
173 </script> 185 </script>
174 186
@@ -184,6 +196,7 @@
184 </div> 196 </div>
185 <!-- TODO: Remove and add as a component --> 197 <!-- TODO: Remove and add as a component -->
186 <div id="colortoolbar"></div> 198 <div id="colortoolbar"></div>
199 <div id="disabledCondition" class="panelDisabled"></div>
187 </div> 200 </div>
188 201
189 </body> 202 </body>
diff --git a/js/components/layout/tools-list.reel/tools-list.js b/js/components/layout/tools-list.reel/tools-list.js
index e26ab391..5ea6f70f 100755
--- a/js/components/layout/tools-list.reel/tools-list.js
+++ b/js/components/layout/tools-list.reel/tools-list.js
@@ -29,10 +29,27 @@ exports.ToolsList = Montage.create(Component, {
29 RotateStageTool3D: { value: null }, 29 RotateStageTool3D: { value: null },
30 PanTool: { value: null }, 30 PanTool: { value: null },
31 ZoomTool: { value: null }, 31 ZoomTool: { value: null },
32 disabled: { value: true},
33
34 handleOpenDocument: {
35 value: function(){
36 this.disabled = false;
37 }
38 },
39
40 handleCloseDocument: {
41 value: function(){
42 if(!this.application.ninja.documentController.activeDocument) {
43 this.disabled = true;
44 }
45 }
46 },
32 47
33 prepareForDraw: { 48 prepareForDraw: {
34 enumerable: false, 49 enumerable: false,
35 value: function() { 50 value: function() {
51 this.eventManager.addEventListener( "openDocument", this, false);
52 this.eventManager.addEventListener( "closeDocument", this, false);
36 this.PenTool.options = this.application.ninja.toolsProperties.shapeProperties.lineProperties;//this.application.Ninja.toolsProperties.penProperties; 53 this.PenTool.options = this.application.ninja.toolsProperties.shapeProperties.lineProperties;//this.application.Ninja.toolsProperties.penProperties;
37 54
38 this.SelectionTool.options = this.application.ninja.toolsProperties.selectionProperties; 55 this.SelectionTool.options = this.application.ninja.toolsProperties.selectionProperties;