Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private _startDrag(
index: number,
clientX: number,
clientY: number
): Promise {
const cellModel = this._focusedCell.model as ICodeCellModel;
let selected: nbformat.ICell[] = [cellModel.toJSON()];
const dragImage = CellDragUtils.createCellDragImage(
this._focusedCell,
selected
);
this._drag = new Drag({
mimeData: new MimeData(),
dragImage,
proposedAction: 'copy',
supportedActions: 'copy',
source: this
});
this._drag.mimeData.setData(JUPYTER_CELL_MIME, selected);
const textContent = cellModel.value.text;
this._drag.mimeData.setData('text/plain', textContent);
private _startDrag(index: number, clientX: number, clientY: number) {
const cellModel = this._focusedCell.model as ICodeCellModel;
let selected: nbformat.ICell[] = [cellModel.toJSON()];
const dragImage = CellDragUtils.createCellDragImage(
this._focusedCell,
selected
);
this._drag = new Drag({
mimeData: new MimeData(),
dragImage,
proposedAction: 'copy',
supportedActions: 'copy',
source: this
});
this._drag.mimeData.setData(JUPYTER_CELL_MIME, selected);
const textContent = cellModel.value.text;
this._drag.mimeData.setData('text/plain', textContent);
private _startDrag(
index: number,
clientX: number,
clientY: number
): Promise {
let selected: nbformat.ICell[] = [
CodeCellData.toJSON(this._focusedCell.data)
];
const dragImage = CellDragUtils.createCellDragImage(
this._focusedCell,
selected
);
this._drag = new Drag({
mimeData: new MimeData(),
dragImage,
proposedAction: 'copy',
supportedActions: 'copy',
source: this
});
this._drag.mimeData.setData(JUPYTER_CELL_MIME, selected);
const textContent = this._focusedCell.editor.model.value;
this._drag.mimeData.setData('text/plain', textContent);