From 22c624c43e234753a59830fb349842161554b94d Mon Sep 17 00:00:00 2001 From: eltrac Date: Tue, 10 Feb 2026 11:46:11 +0800 Subject: feat: add config 'zeroMarginBreakpoint' --- src/config.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/config.js') diff --git a/src/config.js b/src/config.js index c306d8f..2a64db1 100644 --- a/src/config.js +++ b/src/config.js @@ -1,9 +1,15 @@ const config = { - selector: '[data-libra]', - margin: 50, - offset: { x: 0, y: 0 }, - transitionDuration: 200, // milliseconds - imageCursor: 'zoom-in', + selector: '[data-libra]', + margin: 50, + + // in small screens, it's best to not use margins + // otherwise, the zoomed image gets even smaller + // define on screen smaller than what size, margin is set to 0 + zeroMarginBreakpoint: 768, + + offset: { x: 0, y: 0 }, + transitionDuration: 200, // milliseconds + imageCursor: 'zoom-in', }; function deepMerge(target, source) { -- cgit v1.2.3