diff options
author | Pushkar Joshi | 2012-06-06 07:54:11 -0700 |
---|---|---|
committer | Pushkar Joshi | 2012-06-06 07:54:11 -0700 |
commit | cfa1402ac2ce831a83a9d4263d06c452c157a414 (patch) | |
tree | adb8f1f1ad1c4dd1e7e9eee1bd206f1ec338d20c /js/components/layout/tools-properties.reel | |
parent | 8606ee7ec851cb0a971e7556eba5d9386f1b3639 (diff) | |
parent | 5ba54dc275b07e7b2d0ed14751761d1e663d3d14 (diff) | |
download | ninja-cfa1402ac2ce831a83a9d4263d06c452c157a414.tar.gz |
Merge branch 'pentool' into brushtool
Diffstat (limited to 'js/components/layout/tools-properties.reel')
-rwxr-xr-x | js/components/layout/tools-properties.reel/tools-properties.js | 46 |
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 | ||
10 | exports.ToolsProperties = Montage.create(Component, { | 10 | exports.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 | ||