Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Clamp audio slider between 0 - 2 #10854

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Conversation

SYBIOTE
Copy link
Member

@SYBIOTE SYBIOTE commented Aug 4, 2024

The audio slider in the MediaNodeEditor component was not properly clamped between the values of 0 and 2. This pull request fixes that issue by adding a clamp function to ensure the slider value stays within the desired range.

@@ -99,9 +100,9 @@ export const MediaNodeEditor: EditorComponentType = (props) => {
min={0}
max={100}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't it be better to change the min/max/step ?

Copy link
Member Author

@SYBIOTE SYBIOTE Aug 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the min max is for the slider UI, is we want the values to be between 0 - 100 on the UI
, we need to use a converter
to convert between 0-2 on the audio scale to 0 - 100 on the UI

Copy link
Member Author

@SYBIOTE SYBIOTE Aug 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can keep the values between 0 - 2 on the UI as well, if needed, is that preffered?

@SYBIOTE SYBIOTE requested a review from HexaField August 5, 2024 00:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants