aboutsummaryrefslogtreecommitdiff
path: root/js/components/layout/tools-properties.reel
diff options
context:
space:
mode:
authorPushkar Joshi2012-06-06 07:54:11 -0700
committerPushkar Joshi2012-06-06 07:54:11 -0700
commitcfa1402ac2ce831a83a9d4263d06c452c157a414 (patch)
treeadb8f1f1ad1c4dd1e7e9eee1bd206f1ec338d20c /js/components/layout/tools-properties.reel
parent8606ee7ec851cb0a971e7556eba5d9386f1b3639 (diff)
parent5ba54dc275b07e7b2d0ed14751761d1e663d3d14 (diff)
downloadninja-cfa1402ac2ce831a83a9d4263d06c452c157a414.tar.gz
Merge branch 'pentool' into brushtool
Diffstat (limited to 'js/components/layout/tools-properties.reel')
-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