I'm implementing the drag&drop feature in the Angular2 app.
When I'm trying to write this code
public onKitItemDragStart(itemID: number, index: number, event: DragEvent): void {
let img: HTMLImageElement = document.createElement('img');
img.src = '.....';
// image styling here
event.dataTransfer.setDragImage(img, 0, 0);
}
I'm getting the error from the TSLint:
TS2339:Property 'setDragImage' does not exists on type 'DataTransfer'.
In the same time, if I'm doing the cmd+click on this method, I see the method setDragImagein the DataTransfer inferface within lib.es6.d.ts file (I'm using storm, if it's important).
So, why am I getting this error?
One more question - okay, TSLint only checking the dependencies but this code is not working anyway, why?
Alternately, can I just remove the "half-opacity" from the ghost image? As I read, I can't, but maybe there is some way to do it?