aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/clipboard/external-apps-clipboard-agent.js6
-rw-r--r--js/controllers/clipboard-controller.js15
2 files changed, 1 insertions, 20 deletions
diff --git a/js/clipboard/external-apps-clipboard-agent.js b/js/clipboard/external-apps-clipboard-agent.js
index 65410543..b82784d3 100644
--- a/js/clipboard/external-apps-clipboard-agent.js
+++ b/js/clipboard/external-apps-clipboard-agent.js
@@ -148,16 +148,12 @@ var ExternalAppsClipboardAgent = exports.ExternalAppsClipboardAgent = Montage.cr
148 data = htmlData ? htmlData : textData; 148 data = htmlData ? htmlData : textData;
149 149
150 if (data && data.length) { 150 if (data && data.length) {
151 //deselect current selections
152 this.application.ninja.selectedElements.length = 0;
153 NJevent("selectionChange", {"elements": this.application.ninja.selectedElements, "isDocument": true} );
154
155 divWrapper = document.application.njUtils.make("div", null, this.application.ninja.currentDocument); 151 divWrapper = document.application.njUtils.make("div", null, this.application.ninja.currentDocument);
156 this.application.ninja.elementMediator.addElements(divWrapper, {"height": "68px", 152 this.application.ninja.elementMediator.addElements(divWrapper, {"height": "68px",
157 "left": "0px", 153 "left": "0px",
158 "position": "absolute", 154 "position": "absolute",
159 "top": "0px", 155 "top": "0px",
160 "width": "161px"}, false); 156 "width": "161px"}, false/*notify*/, false/*callAddDelegate*/);
161 157
162 divWrapper.innerHTML = data; 158 divWrapper.innerHTML = data;
163 159
diff --git a/js/controllers/clipboard-controller.js b/js/controllers/clipboard-controller.js
index c3543c95..afc94c8c 100644
--- a/js/controllers/clipboard-controller.js
+++ b/js/controllers/clipboard-controller.js
@@ -87,11 +87,6 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component
87 } 87 }
88 } 88 }
89 89
90 //perform clipboard operations only if selection tool is selected
91 if(this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.selectionToolIndex].selected === false){
92 return;
93 }
94
95 if(this.clipboardContext === "stage"){ 90 if(this.clipboardContext === "stage"){
96 ElementsClipboardAgent.copy(clipboardEvent); 91 ElementsClipboardAgent.copy(clipboardEvent);
97 } 92 }
@@ -111,11 +106,6 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component
111 } 106 }
112 } 107 }
113 108
114 //perform clipboard operations only if selection tool is selected
115 if(this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.selectionToolIndex].selected === false){
116 return;
117 }
118
119 if(this.clipboardContext === "stage"){ 109 if(this.clipboardContext === "stage"){
120 ElementsClipboardAgent.cut(clipboardEvent); 110 ElementsClipboardAgent.cut(clipboardEvent);
121 } 111 }
@@ -142,11 +132,6 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component
142 } 132 }
143 } 133 }
144 134
145 //perform clipboard operations only if selection tool is selected
146 if(this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.selectionToolIndex].selected === false){
147 return;
148 }
149
150 //TODO: return if stage is not focussed 135 //TODO: return if stage is not focussed
151 136
152 if(this.clipboardContext === "stage"){ 137 if(this.clipboardContext === "stage"){