From 825fa42141c9d83c95ae1c5d7fbfe05692c8cf3e Mon Sep 17 00:00:00 2001 From: kkapsner Date: Sun, 7 Apr 2024 01:53:01 +0200 Subject: [PATCH] Fix isPointInPath and isPointInStroke Fixes #696 --- lib/modifiedCanvasAPI.js | 4 ++-- releaseNotes.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/modifiedCanvasAPI.js b/lib/modifiedCanvasAPI.js index 6dd6ed1..ad3b06c 100644 --- a/lib/modifiedCanvasAPI.js +++ b/lib/modifiedCanvasAPI.js @@ -427,7 +427,7 @@ return getIsPointValue({ func: (x, y) => original.call(this, x, y, args[2]), x, y, - index: x + this.width * y, + index: x + this.canvas.width * y, originalValue, window, prefs }); } @@ -462,7 +462,7 @@ return getIsPointValue({ func, x, y, - index: x + this.width * y, + index: x + this.canvas.width * y, originalValue, window, prefs }); } diff --git a/releaseNotes.txt b/releaseNotes.txt index 5a23371..be75e45 100644 --- a/releaseNotes.txt +++ b/releaseNotes.txt @@ -6,7 +6,7 @@ Version 1.10.1: - fixes: - - + - isPointInPath and isPointInStroke return undefined with persistent rng known issues: - if a data URL is blocked the page action button does not appear