mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-14 15:16:35 +03:00
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>
14 lines
252 B
JavaScript
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
|
|
});
|
|
}
|
|
|
|
|
|
|