Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a dropdown for assigning a pose variable to a waypoint #1162

Merged
merged 5 commits into from
Feb 5, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into pose-assign-waypoint
shueja authored Jan 22, 2025
commit 87febd96b23e612d600ddb5aefdd3c328ea62882
17 changes: 14 additions & 3 deletions src/document/ExpressionStore.tsx
Original file line number Diff line number Diff line change
@@ -598,10 +598,21 @@ export const Variables = types
}
return vars;
},
get sortedPoseKeys() : Array<string> {
return Array.from(self.poses.keys()).sort((a, b) =>
a.toLocaleUpperCase() > b.toLocaleUpperCase() ? 1 : -1
get sortedExpressions(): Array<[string, IExpressionStore]> {
return Array.from(self.expressions.entries()).sort((a, b) =>
a[0].toLocaleUpperCase() > b[0].toLocaleUpperCase() ? 1 : -1
);
},
get sortedExpressionKeys(): Array<string> {
return this.sortedExpressions.map(([key, _]) => key);
},
get sortedPoses(): Array<[string, IExprPose]> {
return Array.from(self.poses.entries()).sort((a, b) =>
a[0].toLocaleUpperCase() > b[0].toLocaleUpperCase() ? 1 : -1
);
},
get sortedPoseKeys(): Array<string> {
return this.sortedPoses.map(([key, _]) => key);
}
}))
.actions((self) => ({

Unchanged files with check annotations Beta

import { Autocomplete, createFilterOptions, MenuItem, Select, SelectChangeEvent, TextField } from "@mui/material";
import { Component } from "react";
import { doc } from "../../document/DocumentManager";
import { observer } from "mobx-react";

Check failure on line 4 in src/components/config/PoseAssignToWaypointDropdown.tsx

GitHub Actions / Format

'MenuItem' is defined but never used. Allowed unused vars must match /^_/u
import { MathNode } from "mathjs";

Check failure on line 5 in src/components/config/PoseAssignToWaypointDropdown.tsx

GitHub Actions / Format

'Select' is defined but never used. Allowed unused vars must match /^_/u
import { math } from "../../document/ExpressionStore";

Check failure on line 6 in src/components/config/PoseAssignToWaypointDropdown.tsx

GitHub Actions / Format

'SelectChangeEvent' is defined but never used. Allowed unused vars must match /^_/u
import Waypoint from "../../assets/Waypoint";
type Props = {
setXExpression: (expr: MathNode) => void;
setHeadingExpression: (expr: MathNode) => void;
onDefinePose: (variableName: string) => void;
poses: readonly PoseVariableWithCustom[];
};

Check failure on line 14 in src/components/config/PoseAssignToWaypointDropdown.tsx

GitHub Actions / Format

'Waypoint' is defined but never used. Allowed unused vars must match /^_/u
export interface PoseVariableWithCustom {
isAdd?: boolean;
title: string;
You are viewing a condensed version of this merge commit. You can view the full changes here.