feat: slider
This commit is contained in:
@@ -82,6 +82,8 @@ export default ({
|
|||||||
|
|
||||||
// Reflect external progress into the slider UI
|
// Reflect external progress into the slider UI
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (seekingRef.current) return;
|
||||||
|
|
||||||
if (typeof progress === "number" && layout?.width) {
|
if (typeof progress === "number" && layout?.width) {
|
||||||
const max = layout.width - INITIAL_BOX_SIZE;
|
const max = layout.width - INITIAL_BOX_SIZE;
|
||||||
const clamped = Math.max(0, Math.min(1, progress));
|
const clamped = Math.max(0, Math.min(1, progress));
|
||||||
|
|||||||
Reference in New Issue
Block a user