We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ddede18 + 38e944d commit 4ade39bCopy full SHA for 4ade39b
src/accessibility/outputs.js
@@ -548,7 +548,8 @@ p5.prototype._getPos = function (x, y) {
548
this.drawingContext.getTransform();
549
const { x: transformedX, y: transformedY } = untransformedPosition
550
.matrixTransform(currentTransform);
551
- const { width: canvasWidth, height: canvasHeight } = this;
+ const canvasWidth = this.width * this._pixelDensity;
552
+ const canvasHeight = this.height * this._pixelDensity;
553
if (transformedX < 0.4 * canvasWidth) {
554
if (transformedY < 0.4 * canvasHeight) {
555
return 'top left';
0 commit comments