clipwise 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -704,7 +704,8 @@ async function composeFrame(frame, effects, output, context) {
704
704
  }
705
705
  const scale = ctx.zoomScale;
706
706
  if (effects.zoom.enabled && scale > 1) {
707
- const rawFocus = frame.clickPosition ?? frame.cursorPosition ?? { x: frame.viewport.width / 2, y: frame.viewport.height / 2 };
707
+ const followCursor = effects.zoom.autoZoom.followCursor;
708
+ const rawFocus = followCursor ? frame.cursorPosition ?? frame.clickPosition ?? { x: frame.viewport.width / 2, y: frame.viewport.height / 2 } : frame.clickPosition ?? frame.cursorPosition ?? { x: frame.viewport.width / 2, y: frame.viewport.height / 2 };
708
709
  const offset = getFrameOffset(effects.deviceFrame, dpr);
709
710
  const focusPoint = {
710
711
  x: rawFocus.x * dpr + offset.left,