Skip to content

Commit

Permalink
https://1rosehip.atlassian.net/browse/RRS-106
Browse files Browse the repository at this point in the history
  • Loading branch information
mzusin committed Jul 25, 2023
1 parent 1b0ed2f commit abacfdf
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 188 deletions.
2 changes: 1 addition & 1 deletion dist/mz-react-round-slider.esm.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/mz-react-round-slider.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/mz-react-round-slider.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/mz-react-round-slider.min.js.map

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/core/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@ export const RoundSlider = (props: ISettings) => {
if(nextAngle <= prevAngle) {
nextAngle += 360;
}
else{
if(mod(prevAngle, 360) <= mod(nextAngle, 360)) {
prevAngle = mod(prevAngle, 360);
nextAngle = mod(nextAngle, 360);
}
}

if(!isAngleInArc(prevAngle, nextAngle, newAngleDeg)){
newAngleDeg = getClosestEdge(
Expand Down
12 changes: 6 additions & 6 deletions src/example/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ export const test2PointersOnCircle = () => {
export const testMultiplePointers = () => {
return (
<>
{/*<RoundSlider
<RoundSlider
pathRadius={ 150 }
pathStartAngle={ 0 }
pathEndAngle={ 180 }
Expand Down Expand Up @@ -467,7 +467,7 @@ export const testMultiplePointers = () => {
value: 90,
}
]}
/>*/}
/>

<RoundSlider
pathRadius={ 150 }
Expand All @@ -486,7 +486,7 @@ export const testMultiplePointers = () => {
]}
/>

{/*<RoundSlider
<RoundSlider
pathRadius={ 150 }
pathStartAngle={ 270 }
pathEndAngle={ 0 }
Expand Down Expand Up @@ -518,7 +518,7 @@ export const testMultiplePointers = () => {
value: 90,
}
]}
/>*/}
/>
</>
)
};
Expand Down Expand Up @@ -1674,8 +1674,8 @@ const App = () => {
<>
{/*{ testInnerCircle() }*/}
{/*{ TestSmallCircle() }*/}
{ testMultiplePointers() }
{/*{ test2PointersOnCircle() }*/}
{/*{ testMultiplePointers() }*/}
{ test2PointersOnCircle() }
{/*{ testTicksProperties() }*/}
{/*{ testCirclePathSegments() }*/}
{/*{ testBorder() }*/}
Expand Down
188 changes: 16 additions & 172 deletions test/browser/example.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions test/browser/example.min.js.map

Large diffs are not rendered by default.

0 comments on commit abacfdf

Please sign in to comment.