aboutsummaryrefslogtreecommitdiff
path: root/js/components/layout/tools-list.reel/tools-list.js
diff options
context:
space:
mode:
authorhwc4872012-06-04 10:21:24 -0700
committerhwc4872012-06-04 10:21:24 -0700
commit468b20e7fbc27882f8a37c83afd86d1d06c52afd (patch)
tree6c2a9c26429c4852961bdabba8f3dad45499be85 /js/components/layout/tools-list.reel/tools-list.js
parent3f5351c5d75080727953caf5d8d9a312c1c9391b (diff)
parentc1ec69879028220b0c3f11ad6e24035bf527802c (diff)
downloadninja-468b20e7fbc27882f8a37c83afd86d1d06c52afd.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Textures
Diffstat (limited to 'js/components/layout/tools-list.reel/tools-list.js')
-rwxr-xr-xjs/components/layout/tools-list.reel/tools-list.js40
1 files changed, 30 insertions, 10 deletions
diff --git a/js/components/layout/tools-list.reel/tools-list.js b/js/components/layout/tools-list.reel/tools-list.js
index a10b6c3e..c46c065e 100755
--- a/js/components/layout/tools-list.reel/tools-list.js
+++ b/js/components/layout/tools-list.reel/tools-list.js
@@ -26,18 +26,40 @@ exports.ToolsList = Montage.create(Component, {
26 RotateStageTool3D: { value: null }, 26 RotateStageTool3D: { value: null },
27 PanTool: { value: null }, 27 PanTool: { value: null },
28 ZoomTool: { value: null }, 28 ZoomTool: { value: null },
29 disabled: { value: true},
30 29
31 handleOpenDocument: { 30 _currentDocument: {
32 value: function(){ 31 enumerable: false,
33 this.disabled = false; 32 value: null
33 },
34
35 currentDocument: {
36 enumerable: false,
37 get: function() {
38 return this._currentDocument;
39 },
40 set: function(value) {
41 if (value === this._currentDocument) {
42 return;
43 }
44
45 this._currentDocument = value;
46
47 this.disabled = !this._currentDocument;
48
34 } 49 }
35 }, 50 },
36 51
37 handleCloseDocument: { 52 _disabled: {
38 value: function(){ 53 value: true
39 if(!this.application.ninja.documentController.activeDocument) { 54 },
40 this.disabled = true; 55
56 disabled: {
57 get: function() {
58 return this._disabled;
59 },
60 set: function(value) {
61 if(value !== this._disabled) {
62 this._disabled = value;
41 } 63 }
42 } 64 }
43 }, 65 },
@@ -45,8 +67,6 @@ exports.ToolsList = Montage.create(Component, {
45 prepareForDraw: { 67 prepareForDraw: {
46 enumerable: false, 68 enumerable: false,
47 value: function() { 69 value: function() {
48 this.eventManager.addEventListener( "openDocument", this, false);
49 this.eventManager.addEventListener( "closeDocument", this, false);
50 this.PenTool.options = this.application.ninja.toolsProperties.shapeProperties.lineProperties;//this.application.Ninja.toolsProperties.penProperties; 70 this.PenTool.options = this.application.ninja.toolsProperties.shapeProperties.lineProperties;//this.application.Ninja.toolsProperties.penProperties;
51 71
52 this.SelectionTool.options = this.application.ninja.toolsProperties.selectionProperties; 72 this.SelectionTool.options = this.application.ninja.toolsProperties.selectionProperties;