refboard: fix flipped image crop coordinate mapping
This commit is contained in:
@@ -221,8 +221,8 @@ function getImageViewNormalizedFromLocal(
|
|||||||
const normX = data.w === 0 ? 0 : sourceX / data.w;
|
const normX = data.w === 0 ? 0 : sourceX / data.w;
|
||||||
const normY = data.h === 0 ? 0 : sourceY / data.h;
|
const normY = data.h === 0 ? 0 : sourceY / data.h;
|
||||||
return {
|
return {
|
||||||
x: data.flipX ? 1 - normX : normX,
|
x: normX,
|
||||||
y: data.flipY ? 1 - normY : normY,
|
y: normY,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user