Merge pull request #8537 from Tainan404/issue-8439

Workaround to CTM request in svg out of the screen
This commit is contained in:
Anton Georgiev 2020-01-24 14:46:16 -05:00 committed by GitHub
commit b5bcedf927
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,6 +10,7 @@ export default class WhiteboardOverlay extends Component {
// accepts and returns a point of type SvgPoint and an svg object
static coordinateTransform(screenPoint, someSvgObject) {
const CTM = someSvgObject.getScreenCTM();
if (!CTM) return {};
return screenPoint.matrixTransform(CTM.inverse());
}