Skip to content

Commit 4ade39b

Browse files
authored
Merge pull request #6649 from calebfoss/text-output-6612
Resolves #6612
2 parents ddede18 + 38e944d commit 4ade39b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/accessibility/outputs.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,8 @@ p5.prototype._getPos = function (x, y) {
548548
this.drawingContext.getTransform();
549549
const { x: transformedX, y: transformedY } = untransformedPosition
550550
.matrixTransform(currentTransform);
551-
const { width: canvasWidth, height: canvasHeight } = this;
551+
const canvasWidth = this.width * this._pixelDensity;
552+
const canvasHeight = this.height * this._pixelDensity;
552553
if (transformedX < 0.4 * canvasWidth) {
553554
if (transformedY < 0.4 * canvasHeight) {
554555
return 'top left';

0 commit comments

Comments
 (0)