Background panning
This commit is contained in:
@@ -14,6 +14,7 @@ Also see the other related files: API.md, IIS.md, SPEC.md
|
|||||||
## Working Style
|
## Working Style
|
||||||
|
|
||||||
- After every iteration, do a git commit with a brief summary of the changes as a commit message.
|
- After every iteration, do a git commit with a brief summary of the changes as a commit message.
|
||||||
|
- If you find unexpected changes in the code, never revert them without asking first.
|
||||||
- Implement API first, UI second
|
- Implement API first, UI second
|
||||||
- Keep changes small and testable
|
- Keep changes small and testable
|
||||||
- Prefer clarity over abstraction
|
- Prefer clarity over abstraction
|
||||||
|
|||||||
@@ -839,9 +839,9 @@ function setupCardVisualHover(el, url) {
|
|||||||
|
|
||||||
function setupBackgroundPan(config = {}) {
|
function setupBackgroundPan(config = {}) {
|
||||||
const root = document.documentElement;
|
const root = document.documentElement;
|
||||||
const maxOffset = config.maxOffsetPx ?? 30;
|
const maxOffset = config.maxOffsetPx ?? 10;
|
||||||
const ease = config.ease ?? 0.08;
|
const ease = config.ease ?? 0.03;
|
||||||
const scaleFactor = config.scaleFactor ?? 1.12;
|
const scaleFactor = config.scaleFactor ?? 1.05;
|
||||||
if (scaleFactor) {
|
if (scaleFactor) {
|
||||||
root.style.setProperty("--bg-scale", scaleFactor);
|
root.style.setProperty("--bg-scale", scaleFactor);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user