aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/selection-controller.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-05-29 11:43:55 -0700
committerValerio Virgillito2012-05-29 11:43:55 -0700
commit4fa08fe2ce439a5f5c248c568f72d3828ee11b36 (patch)
tree3fb2977a349c01c5b8cdbd2ab686a0099e3c3999 /js/controllers/selection-controller.js
parent0c9c719acb9381e147b90abbf733ad7eb3beb7f7 (diff)
downloadninja-4fa08fe2ce439a5f5c248c568f72d3828ee11b36.tar.gz
fix for the document tab close button and rulers on initial document
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/controllers/selection-controller.js')
-rwxr-xr-xjs/controllers/selection-controller.js40
1 files changed, 1 insertions, 39 deletions
diff --git a/js/controllers/selection-controller.js b/js/controllers/selection-controller.js
index db8bdf51..0d34ff25 100755
--- a/js/controllers/selection-controller.js
+++ b/js/controllers/selection-controller.js
@@ -20,44 +20,7 @@ exports.SelectionController = Montage.create(Component, {
20 } 20 }
21 }, 21 },
22 22
23 _currentDocument: { 23 // Bound property to the ninja currentSelectedContainer
24 value : null,
25 enumerable : false
26 },
27
28 currentDocument : {
29 get : function() {
30 return this._currentDocument;
31 },
32 set : function(value) {
33 if (value === this._currentDocument) {
34 return;
35 }
36
37 this._currentDocument = value;
38
39 if(this._currentDocument.currentView === "design") {
40
41 /*
42 this._isDocument = true;
43
44 if(currentSelectionArray) {
45 this.application.ninja.selectedElements = currentSelectionArray;
46 if(currentSelectionArray.length) {
47 this._isDocument = false;
48 NJevent("selectionChange", {"elements": this.application.ninja.selectedElements, "isDocument": this._isDocument});
49 }
50 }
51
52 this._selectionContainer = this.application.ninja.currentSelectedContainer;
53 */
54 }
55 }
56 },
57
58 /*
59 * Bound property to the ninja currentSelectedContainer
60 */
61 _selectionContainer: { 24 _selectionContainer: {
62 value: null 25 value: null
63 }, 26 },
@@ -77,7 +40,6 @@ exports.SelectionController = Montage.create(Component, {
77 40
78 deserializedFromTemplate: { 41 deserializedFromTemplate: {
79 value: function() { 42 value: function() {
80 this.eventManager.addEventListener("openDocument", this, false);
81 this.eventManager.addEventListener("elementAdded", this, false); 43 this.eventManager.addEventListener("elementAdded", this, false);
82 this.eventManager.addEventListener("elementsRemoved", this, false); 44 this.eventManager.addEventListener("elementsRemoved", this, false);
83 this.eventManager.addEventListener("elementReplaced", this, false); 45 this.eventManager.addEventListener("elementReplaced", this, false);