summaryrefslogtreecommitdiff
path: root/src/shadow.js
AgeCommit message (Collapse)Author
2025-09-18refactor: avoid repetitionEltrac
Since we are constantly adjusting shadow's positions and fetching original positions, encapsulate them into functions.
2025-09-18refactor: avoid repeating animation logicEltrac
2025-09-18style: consistent unit assignmentEltrac
2025-09-18fix: missing transition when closingQuarkPixel
2025-09-18fix: display nothing when image not fully loadedQuarkPixel
2025-09-18fix: viewport change causes animation position errorQuarkPixel
2025-09-18feat(config): make libra more customizable through config.js andQuarkPixel
libra.css
2025-09-17feat: configurable offsetEltrac
2025-09-17fix: did not add 'open' class to open shadowEltrac
2025-09-17fix: top, left, with, height attr not set properlyEltrac
Add 'px' unit after top, left, width, height values. Providing a number value might cause some occasional problems.
2025-09-17fix: fix shadow positioning using getBoundingClientRectEltrac
2025-09-16refactor: move image handling to shadow classEltrac
- lightbox module no longer handles original image visibility - lightbox module no longer handles shadow placement - lightbox module now only fetch and use shadow object
2025-09-16refactor: shorter variable nameEltrac
2025-09-16refactor: move animation logic to individual moduleEltrac
2025-09-16fix: unexpected zoom-out animationEltrac
2025-09-16fix: smoother zoom-in animation, more accurate positioningEltrac
2025-09-15refactor: use transform instead of requestAnimationFrameEltrac
2025-09-15chore: remove console logsEltrac
2025-09-15refactor: rename project to libra, minify outputEltrac
2025-09-15fix: exit animation not workingEltrac
delay destruction after animation is played
2025-09-15refactor: shadow is no longer a child of overlayEltrac
2025-09-15feat: add margin to lightboxEltrac
2025-09-15fix: sometimes images are clipped verticallyEltrac
2025-09-15fix: zoomIn animation not completeEltrac
2025-09-15refactor(animation): calculate final statesEltrac
2025-09-15feat: correctly close lightboxEltrac
2025-09-15refactor: lightbox ID generation and shadow managementEltrac
Replaces the async SHA-256 based unique ID generation with a synchronous hashCode method in Utility. Refactors LightBox to manage Shadow instances in a local cache instead of querying the DOM, and removes the static find method from Shadow. Also extracts image link wrapping logic into a helper method for clarity.
2025-09-15refactor: LightBox and Shadow classes for clarity and reuseEltrac
Added section comments and reorganized methods in both LightBox and Shadow for better readability. Shadow now supports finding existing instances, tracks open state, and separates initialization logic. Improved animation handling and event binding for closing shadows.
2025-09-15refactor: rename 'zoom/zoomed' to 'open'Eltrac
2025-09-15initial commitEltrac