Skip to content

Fix simple image slider arrow positioning#872

Merged
CySSoO merged 1 commit intomasterfrom
cyssoo/fix-arrow-positioning-in-prettyblock-slider
Jan 29, 2026
Merged

Fix simple image slider arrow positioning#872
CySSoO merged 1 commit intomasterfrom
cyssoo/fix-arrow-positioning-in-prettyblock-slider

Conversation

@CySSoO
Copy link
Contributor

@CySSoO CySSoO commented Jan 29, 2026

Motivation

  • Arrow controls in the Prettyblock Simple Image slider could be misaligned when the active slide image size differs from the computed item width, so the design needs the active width to reflect the actual rendered image.

Description

  • Added a new updateActiveWidth function in views/js/everblock-slider.js that computes the active width from the currently active slide's rendered img width with fallbacks to the item width and previous multiplier.
  • Replaced the previous fixed --ever-slider-active-width assignment in updateState with a call to the new updateActiveWidth so arrow positions are recalculated whenever the slider state updates.
  • Collected slide images during setupSlider and attached load event listeners to each image to call updateState after images finish loading so the active width is refreshed once images are rendered.

Testing

  • No automated tests were executed for this change.

Codex Task

@CySSoO CySSoO merged commit 7d4a986 into master Jan 29, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant