Skip to content

Commit

Permalink
allow layout changes while scrolling, disabled when zooming (#4665)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminpkane authored Aug 13, 2024
1 parent 3393ba0 commit d0f67e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/packages/spotlight/src/createScrollReader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ export default function createScrollReader(
destroy: () => {
destroyed = true;
},
scrolling: () => scrolling,
zooming: () => zooming
};
}
6 changes: 3 additions & 3 deletions app/packages/spotlight/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
SCROLLBAR_WIDTH,
TWO,
ZERO,
ZOOMING_COEFFICIENT,
ZOOMING_COEFFICIENT
} from "./constants";
import createScrollReader from "./createScrollReader";
import { Load, RowChange } from "./events";
Expand Down Expand Up @@ -190,7 +190,7 @@ export default class Spotlight<K, V> extends EventTarget {
requestAnimationFrame(() => {
if (
this.#element.scrollTop > this.#containerHeight ||
this.#scrollReader.scrolling()
this.#scrollReader.zooming()
) {
requestAnimationFrame(run);
return;
Expand Down Expand Up @@ -258,7 +258,7 @@ export default class Spotlight<K, V> extends EventTarget {
requestAnimationFrame(() => {
if (
this.#element.scrollTop < ZERO ||
this.#scrollReader.scrolling()
this.#scrollReader.zooming()
) {
requestAnimationFrame(run);
return;
Expand Down

0 comments on commit d0f67e2

Please sign in to comment.