drag and drop restrict window outside canvas area

//window cannot load dragover an image outside canvas area
window.addEventListener(“dragover”,function(e){
e = e || event;
e.preventDefault();
},false);

//window cannot load drop  an image outside canvas area         window.addEventListener(“drop”,function(e){
e = e || event;
e.preventDefault();
},false);

Leave a Reply

Your email address will not be published. Required fields are marked *