NUKnightLab / NUKnightLab/juxtapose

Allow updateSlider to go all the way left or right

Open
#170 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
882
Forks
127
Avg merge
1m
Merged PRs (30d)
2

Description

Line #338 in juxtapose.js, in the updateSlider function, is there a particular reason it's
if (leftPercentNum > 0 && leftPercentNum < 100) {
instead of
if (leftPercentNum >= 0 && leftPercentNum <= 100) {
?

The way it is now, I cannot make a button which, on click, slides the slider all the way right or left ('show only before' or 'show only after' button). For now, I just grabbed the code (great work, btw!!) and made a copy of our own and made this change locally, but that would be a simple and welcome change. Thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in juxtapose.js at line 338, inside updateSlider, and inspect how the current bounds condition handles slider positions. Done means the slider can be moved all the way left or right so callers can show only the before or after image; no test file is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.