mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-01 16:51:10 -04:00
Check if matrix is null in mouseToSvg
This commit is contained in:
parent
c4cad3c6e4
commit
42f620daa2
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue