Check if matrix is null in mouseToSvg

This commit is contained in:
Rachel Fenichel 2016-06-21 15:56:00 -07:00
parent c4cad3c6e4
commit 42f620daa2

View file

@ -315,6 +315,10 @@ Blockly.mouseToSvg = function(e, svg, matrix) {
var svgPoint = svg.createSVGPoint();
svgPoint.x = e.clientX;
svgPoint.y = e.clientY;
if (!matrix) {
matrix = svg.getScreenCTM().inverse();
}
return svgPoint.matrixTransform(matrix);
};