mirror of
https://github.com/liabru/matter-js.git
synced 2024-11-30 10:20:52 -05:00
fix Matter.Mouse when element does not have fixed dimensions, closes #73
This commit is contained in:
parent
faf534ad1f
commit
1340159451
1 changed files with 2 additions and 2 deletions
|
@ -193,8 +193,8 @@ var Common = require('../core/Common');
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
x: x / (element.clientWidth / element.width * pixelRatio),
|
x: x / (element.clientWidth / (element.width || element.clientWidth) * pixelRatio),
|
||||||
y: y / (element.clientHeight / element.height * pixelRatio)
|
y: y / (element.clientHeight / (element.height || element.clientHeight) * pixelRatio)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue