mirror of
https://github.com/google/blockly.git
synced 2026-01-07 00:50:27 +01:00
Check if matrix is null in mouseToSvg
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user