Files
pbakaus_impeccable/public/js/components/lens.js
T
Paul BakausandClaude Opus 4.6 a3633c66f0 Fix split-compare clip-path angle to match divider's skewX(-10deg)
The divider uses a fixed CSS angle (skewX(-10deg)) but the clip-path
mask used a fixed percentage offset (skewOffset=8), which only matches
at one specific aspect ratio. Now computes skewOffset dynamically from
the container's actual dimensions via ResizeObserver.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 08:04:24 -07:00

14 lines
252 B
JavaScript

import { initSplitCompare } from "../effects/split-compare.js";
export function initLensEffect() {
const container = document.getElementById("lens-comparison");
if (!container) return;
initSplitCompare(container, {
defaultPosition: 70
});
}