From ac2db49e51f82f5a1cf52ec854b047e007ffbdd7 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Mon, 12 Mar 2012 13:39:58 -0700 Subject: Committing Disabled states for tool-bar, tool-options, viewbar, breadcrumb Signed-off-by: Armen Kesablyan --- js/components/layout/tools-list.reel/tools-list.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'js/components/layout/tools-list.reel/tools-list.js') diff --git a/js/components/layout/tools-list.reel/tools-list.js b/js/components/layout/tools-list.reel/tools-list.js index e26ab391..b44f63b3 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, { RotateStageTool3D: { value: null }, PanTool: { value: null }, ZoomTool: { value: null }, + disabled: { value: true}, + + handleOnOpenDocument: { + value: function(){ + this.disabled = false; + } + }, + + handleCloseDocument: { + value: function(){ + if(!this.application.ninja.documentController.activeDocument) { + this.disabled = true; + } + } + }, prepareForDraw: { enumerable: false, value: function() { + this.eventManager.addEventListener( "onOpenDocument", this, false); + this.eventManager.addEventListener( "closeDocument", this, false); this.PenTool.options = this.application.ninja.toolsProperties.shapeProperties.lineProperties;//this.application.Ninja.toolsProperties.penProperties; this.SelectionTool.options = this.application.ninja.toolsProperties.selectionProperties; -- cgit v1.2.3