Skip to content

Commit

Permalink
Scale width and height by pixelDensity to address issue processing#6612
Browse files Browse the repository at this point in the history
  • Loading branch information
calebfoss committed Dec 23, 2023
1 parent ddede18 commit 38e944d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/accessibility/outputs.js
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,8 @@ p5.prototype._getPos = function (x, y) {
this.drawingContext.getTransform();
const { x: transformedX, y: transformedY } = untransformedPosition
.matrixTransform(currentTransform);
const { width: canvasWidth, height: canvasHeight } = this;
const canvasWidth = this.width * this._pixelDensity;
const canvasHeight = this.height * this._pixelDensity;
if (transformedX < 0.4 * canvasWidth) {
if (transformedY < 0.4 * canvasHeight) {
return 'top left';
Expand Down

0 comments on commit 38e944d

Please sign in to comment.