File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -246,13 +246,6 @@ export class CodeSnippetWidget extends ReactWidget {
246
246
* Handle the `'lm-drop'` event for the widget.
247
247
*/
248
248
private async _evtDrop ( event : IDragEvent ) : Promise < void > {
249
- // TODO: get language from kernel
250
- const notebook : Notebook = event . mimeData . getData ( 'internal:cells' ) [ 0 ]
251
- . parent ;
252
-
253
- const language = notebook . model . defaultKernelLanguage ;
254
- console . log ( language ) ;
255
-
256
249
const data = this . findCellData ( event . mimeData ) ;
257
250
if ( data === undefined ) {
258
251
return ;
@@ -306,6 +299,11 @@ export class CodeSnippetWidget extends ReactWidget {
306
299
this . moveCodeSnippet ( srcIdx , idx ) ;
307
300
}
308
301
} else {
302
+ // TODO: get language from kernel
303
+ const notebook : Notebook = event . mimeData . getData ( 'internal:cells' ) [ 0 ]
304
+ . parent ;
305
+
306
+ const language = notebook . model . defaultKernelLanguage ;
309
307
// Handle the case where we are copying cells
310
308
event . dropAction = 'copy' ;
311
309
You can’t perform that action at this time.
0 commit comments