mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2024-11-25 00:28:20 -05:00
Merge pull request #377 from yueyuzhao/issue/334-fix-ios-callout
disable drag & drop on images
This commit is contained in:
commit
f517e0488a
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