Skip to content

Commit

Permalink
toggle 1px alignment issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tborychowski committed Jul 14, 2023
1 parent ee826bc commit 091e4a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/docs.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/input/toggle/Toggle.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function setKnobPosition () {
let handleLeft = handleStartX;
if (isDragging || value) handleLeft -= scrollerStartX;
if (isDragging) handleLeft += currentX;
handle.style.left = `${Math.round(handleLeft)}px`;
handle.style.left = `${Math.round(handleLeft - 1)}px`;
}
</script>

0 comments on commit 091e4a8

Please sign in to comment.