ISSUE-031 - Little fix to prevent locking overlay images to the bleedover areas when loading images that are larger than the previous image.

This commit is contained in:
Kyle Geib committed 2022-01-21 18:39:20 -05:00
1 parent dd7f49108a
commit 55e07a444e
1 file changed
+2 -2
@@ -42,8 +42,8 @@ export function OverlayDisplay({
const newX = args[0].xPos + delta[0]; const newX = args[0].xPos + delta[0];
const newY = args[0].yPos + delta[1]; const newY = args[0].yPos + delta[1];
dispatch(setPosition({ dispatch(setPosition({
x: newX >= minX && newX <= maxX ? newX : args[0].xPos, x: newX >= minX && newX <= maxX ? newX : newX > maxX ? maxX : args[0].xPos,
y: newY >= minY && newY <= maxY ? newY : args[0].yPos, y: newY >= minY && newY <= maxY ? newY : newY > maxY ? maxY : args[0].yPos,
})); }));
}); });