diff options
author | Jonathan Duran | 2012-06-05 08:42:53 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-06-05 08:42:53 -0700 |
commit | bd2c28100f347afc10243c80b8a288746370eee2 (patch) | |
tree | db507fe0fdbe8e6f98f7d0f022b29c8d5942b4f7 /js/components/layout/tools-properties.reel | |
parent | 121d0e616f48aa7cd048763554089c20a1883d7a (diff) | |
parent | c1ec69879028220b0c3f11ad6e24035bf527802c (diff) | |
download | ninja-bd2c28100f347afc10243c80b8a288746370eee2.tar.gz |
Merge branch 'refs/heads/NINJAmaster' into TimelineUber
Conflicts:
js/controllers/elements/element-controller.js
js/panels/Timeline/Layer.reel/Layer.js
js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
Signed-off-by: Jonathan Duran <jduran@motorola.com>
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 | ||