aboutsummaryrefslogtreecommitdiff
path: root/js/components/layout/tools-properties.reel/tools-properties.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/components/layout/tools-properties.reel/tools-properties.js')
-rwxr-xr-xjs/components/layout/tools-properties.reel/tools-properties.js46
1 files changed, 25 insertions, 21 deletions
diff --git a/js/components/layout/tools-properties.reel/tools-properties.js b/js/components/layout/tools-properties.reel/tools-properties.js
index 47945b58..6ea4ad85 100755
--- a/js/components/layout/tools-properties.reel/tools-properties.js
+++ b/js/components/layout/tools-properties.reel/tools-properties.js
@@ -9,36 +9,40 @@ var Component = require("montage/ui/component").Component;
9 9
10exports.ToolsProperties = Montage.create(Component, { 10exports.ToolsProperties = Montage.create(Component, {
11 11
12 disabled: { 12 _currentDocument: {
13 value: true 13 enumerable: false,
14 value: null
14 }, 15 },
15 16
16 handleCloseDocument: { 17 currentDocument: {
17 value: function(){ 18 enumerable: false,
18 if(!this.application.ninja.documentController.activeDocument) { 19 get: function() {
19 this.disabled = true; 20 return this._currentDocument;
21 },
22 set: function(value) {
23 if (value === this._currentDocument) {
24 return;
20 } 25 }
21 }
22 },
23 26
24 handleOpenDocument: { 27 this._currentDocument = value;
25 value: function() { 28
26 this.disabled = false; 29 this.disabled = !this._currentDocument;
30
27 } 31 }
28 }, 32 },
29 33
30 prepareForDraw: { 34 _disabled: {
31 enumerable: false, 35 value: true
32 value: function() {
33 this.eventManager.addEventListener( "openDocument", this, false);
34 this.eventManager.addEventListener( "closeDocument", this, false);
35 }
36 }, 36 },
37 37
38 draw: { 38 disabled: {
39 enumerable: false, 39 get: function() {
40 value: function() { 40 return this._disabled;
41 //this.selectionProperties.needsDraw = true; 41 },
42 set: function(value) {
43 if(value !== this._disabled) {
44 this._disabled = value;
45 }
42 } 46 }
43 }, 47 },
44 48