mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2024-11-25 00:28:20 -05:00
Don’t adjust paintEditor point on Android
Fixes the issue where the editor doesn’t draw where the finger is touching on Android.
This commit is contained in:
parent
fdd930ee50
commit
a4737a4399
1 changed files with 5 additions and 3 deletions
|
@ -13,7 +13,7 @@ import SVGImage from './SVGImage';
|
||||||
import Camera from './Camera';
|
import Camera from './Camera';
|
||||||
import Events from '../utils/Events';
|
import Events from '../utils/Events';
|
||||||
import Rectangle from '../geom/Rectangle';
|
import Rectangle from '../geom/Rectangle';
|
||||||
import {gn, isTablet, getIdFor} from '../utils/lib';
|
import {gn, isTablet, isiOS, getIdFor} from '../utils/lib';
|
||||||
/*
|
/*
|
||||||
Type of objects:
|
Type of objects:
|
||||||
- fixed: Only exists on Assets Backgrounds and can it only be fill (color or camera) or removed
|
- fixed: Only exists on Assets Backgrounds and can it only be fill (color or camera) or removed
|
||||||
|
@ -1131,8 +1131,10 @@ export default class PaintAction {
|
||||||
pt2.x = pt.x;
|
pt2.x = pt.x;
|
||||||
pt2.y = pt.y;
|
pt2.y = pt.y;
|
||||||
var globalPoint = pt2.matrixTransform(Paint.root.getScreenCTM().inverse());
|
var globalPoint = pt2.matrixTransform(Paint.root.getScreenCTM().inverse());
|
||||||
globalPoint.x = globalPoint.x / Paint.currentZoom;
|
if (isiOS) {
|
||||||
globalPoint.y = globalPoint.y / Paint.currentZoom;
|
globalPoint.x = globalPoint.x / Paint.currentZoom;
|
||||||
|
globalPoint.y = globalPoint.y / Paint.currentZoom;
|
||||||
|
}
|
||||||
return globalPoint;
|
return globalPoint;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue