mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2024-11-28 18:15:37 -05:00
disable drag & drop on images
This commit is contained in:
parent
a5c182d05c
commit
db3821488d
3 changed files with 9 additions and 0 deletions
|
@ -107,6 +107,9 @@ export default class Sprite {
|
|||
|
||||
setCostume (dataurl, fcn) {
|
||||
var img = document.createElement('img');
|
||||
img.ondragstart = function () {
|
||||
return false;
|
||||
}
|
||||
img.src = dataurl;
|
||||
this.img = img;
|
||||
// Make a copy that is not affected by zoom transformation
|
||||
|
|
|
@ -198,6 +198,9 @@ export default class Library {
|
|||
img.style.top = (7 * scaleMultiplier) + 'px';
|
||||
img.style.position = 'relative';
|
||||
img.style.height = (data.height * scale) + 'px';
|
||||
img.ondragstart = function () {
|
||||
return false;
|
||||
}
|
||||
if (data.altmd5) {
|
||||
IO.getAsset(data.altmd5, drawMe);
|
||||
}
|
||||
|
|
|
@ -300,6 +300,9 @@ export default class Home {
|
|||
if (md5) {
|
||||
IO.getAsset(md5, drawMe);
|
||||
}
|
||||
img.ondragstart = function () {
|
||||
return false;
|
||||
}
|
||||
function drawMe (url) {
|
||||
img.src = url;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue