diff options
author | Kruti Shah | 2012-06-12 13:09:11 -0700 |
---|---|---|
committer | Kruti Shah | 2012-06-12 13:09:11 -0700 |
commit | d648c842905c7c53e0f89b943982493d2b79f56e (patch) | |
tree | eb5585f92061975215f6d19305a8d1b76262e2fc /js/components/layout/tools-list.reel | |
parent | bedb38e14887b29eae3cdf1c8d435259c920257c (diff) | |
parent | cf3b96822665751dae7a64644db3cb3960733c3d (diff) | |
download | ninja-d648c842905c7c53e0f89b943982493d2b79f56e.tar.gz |
Merge branch 'refs/heads/TimelineUberjd' into TimelineUber
Conflicts:
js/controllers/elements/element-controller.js
js/document/_toDelete/html-document.js
js/panels/Timeline/Layer.reel/Layer.js
Signed-off-by: Kruti Shah <kruti.shah@motorola.com>
Diffstat (limited to 'js/components/layout/tools-list.reel')
-rwxr-xr-x | js/components/layout/tools-list.reel/tools-list.html | 6 | ||||
-rwxr-xr-x | js/components/layout/tools-list.reel/tools-list.js | 40 |
2 files changed, 31 insertions, 15 deletions
diff --git a/js/components/layout/tools-list.reel/tools-list.html b/js/components/layout/tools-list.reel/tools-list.html index df603bf8..4e5b85ee 100755 --- a/js/components/layout/tools-list.reel/tools-list.html +++ b/js/components/layout/tools-list.reel/tools-list.html | |||
@@ -102,11 +102,7 @@ | |||
102 | "element": {"#": "disabledCondition"} | 102 | "element": {"#": "disabledCondition"} |
103 | }, | 103 | }, |
104 | "bindings": { | 104 | "bindings": { |
105 | "condition": { | 105 | "condition": {"<-": "@owner.disabled"} |
106 | "boundObject": {"@": "owner"}, | ||
107 | "boundObjectPropertyPath": "disabled", | ||
108 | "oneway": true | ||
109 | } | ||
110 | } | 106 | } |
111 | }, | 107 | }, |
112 | 108 | ||
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; |