Skip to content

Commit 777cc65

Browse files
committed
Fix error in moving snippets within a panel
1 parent 5668499 commit 777cc65

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/CodeSnippetWidget.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,6 @@ export class CodeSnippetWidget extends ReactWidget {
245245
* Handle the `'lm-drop'` event for the widget.
246246
*/
247247
private async _evtDrop(event: IDragEvent): Promise<void> {
248-
// TODO: get language from kernel
249-
const notebook: Notebook = event.mimeData.getData('internal:cells')[0]
250-
.parent;
251-
252-
const language = notebook.model.defaultKernelLanguage;
253-
console.log(language);
254-
255248
const data = this.findCellData(event.mimeData);
256249
if (data === undefined) {
257250
return;
@@ -305,6 +298,11 @@ export class CodeSnippetWidget extends ReactWidget {
305298
this.moveCodeSnippet(srcIdx, idx);
306299
}
307300
} else {
301+
// TODO: get language from kernel
302+
const notebook: Notebook = event.mimeData.getData('internal:cells')[0]
303+
.parent;
304+
305+
const language = notebook.model.defaultKernelLanguage;
308306
// Handle the case where we are copying cells
309307
event.dropAction = 'copy';
310308

0 commit comments

Comments
 (0)