fix: eye-dropper not working with app offset correctly on non-1 dPR (#6835)
This commit is contained in:
parent
6126c34dc0
commit
fc9a9a2571
@ -77,8 +77,8 @@ export const EyeDropper: React.FC<{
|
|||||||
colorPreviewDiv.style.left = `${clientX + 20}px`;
|
colorPreviewDiv.style.left = `${clientX + 20}px`;
|
||||||
|
|
||||||
const pixel = ctx.getImageData(
|
const pixel = ctx.getImageData(
|
||||||
clientX * window.devicePixelRatio - appState.offsetLeft,
|
(clientX - appState.offsetLeft) * window.devicePixelRatio,
|
||||||
clientY * window.devicePixelRatio - appState.offsetTop,
|
(clientY - appState.offsetTop) * window.devicePixelRatio,
|
||||||
1,
|
1,
|
||||||
1,
|
1,
|
||||||
).data;
|
).data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user