summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreltrac <hi@eltr.ac>2026-02-10 11:49:26 +0800
committereltrac <hi@eltr.ac>2026-02-10 11:49:26 +0800
commitbf36eb7314302d5d1e104b4e812db8098b08c7d6 (patch)
tree1048ca7d3e618b803517f5fc9622cfe5e9b404cc
parentb8439afdef661946eb0b88de3ca273f16f8088ec (diff)
doc: document config options with comment
-rw-r--r--src/config.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/config.js b/src/config.js
index 2a64db1..50b4dc4 100644
--- a/src/config.js
+++ b/src/config.js
@@ -1,5 +1,9 @@
const config = {
+ // selects images that load libra.js
selector: '[data-libra]',
+
+ // margin between viewport and zoomed image
+ // in px
margin: 50,
// in small screens, it's best to not use margins
@@ -7,7 +11,9 @@ const config = {
// define on screen smaller than what size, margin is set to 0
zeroMarginBreakpoint: 768,
+ // shifts the zoomed image if needed
offset: { x: 0, y: 0 },
+
transitionDuration: 200, // milliseconds
imageCursor: 'zoom-in',
};