From a4737a4399b73f49ee1ab65ee2bc212cd7002d5c Mon Sep 17 00:00:00 2001 From: chrisgarrity Date: Wed, 2 May 2018 15:01:45 -0400 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20adjust=20paintEditor=20point=20?= =?UTF-8?q?on=20Android?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes the issue where the editor doesn’t draw where the finger is touching on Android. --- src/painteditor/PaintAction.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/painteditor/PaintAction.js b/src/painteditor/PaintAction.js index f3f9770..3d793a9 100644 --- a/src/painteditor/PaintAction.js +++ b/src/painteditor/PaintAction.js @@ -13,7 +13,7 @@ import SVGImage from './SVGImage'; import Camera from './Camera'; import Events from '../utils/Events'; import Rectangle from '../geom/Rectangle'; -import {gn, isTablet, getIdFor} from '../utils/lib'; +import {gn, isTablet, isiOS, getIdFor} from '../utils/lib'; /* Type of objects: - 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.y = pt.y; var globalPoint = pt2.matrixTransform(Paint.root.getScreenCTM().inverse()); - globalPoint.x = globalPoint.x / Paint.currentZoom; - globalPoint.y = globalPoint.y / Paint.currentZoom; + if (isiOS) { + globalPoint.x = globalPoint.x / Paint.currentZoom; + globalPoint.y = globalPoint.y / Paint.currentZoom; + } return globalPoint; } }