Skip to content

Commit

Permalink
fix: deregister and remove from frontend device children
Browse files Browse the repository at this point in the history
  • Loading branch information
aolsenjazz committed Oct 15, 2024
1 parent dda368f commit 1992521
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ type PropTypes = {
horizontal: boolean;
inverted: boolean;
id: string;
defaultVal: number;
};

export function HandleLayout(props: PropTypes) {
const { handleWidth, handleHeight, horizontal, inverted, id } = props;
const { handleWidth, handleHeight, horizontal, inverted, id, defaultVal } =
props;

const recentMessages = useAppSelector(selectRecentRemoteMessagesById(id, 1));

const state = {
value: recentMessages.length ? recentMessages[0].msg[2] : 127,
value: recentMessages.length ? recentMessages[0].msg[2] : defaultVal,
};

const Layout = horizontal ? HorizontalHandleLayout : VerticalHandleLayout;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export default function InteractiveInputLayout(props: InputLayoutPropTypes) {
handleHeight={`${(handleHeight / driver.height) * 100}%`}
horizontal={horizontal}
inverted={inverted}
defaultVal={driver.status === 'pitchbend' ? 64 : 127}
/>
);
}

0 comments on commit 1992521

Please sign in to comment.