@wandelbots/wandelbots-js-react-components 1.24.4 → 1.24.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/jogging/JoggingOptions.d.ts.map +1 -1
- package/dist/components/jogging/JoggingStore.d.ts +1 -0
- package/dist/components/jogging/JoggingStore.d.ts.map +1 -1
- package/dist/index.cjs +15 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1096 -1093
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/jogging/JoggingOptions.tsx +4 -1
- package/src/components/jogging/JoggingStore.ts +5 -1
package/package.json
CHANGED
|
@@ -54,7 +54,10 @@ export const JoggingOptions = observer(({ store }: { store: JoggingStore }) => {
|
|
|
54
54
|
>
|
|
55
55
|
{store.coordSystems.map((cs) => (
|
|
56
56
|
<MenuItem key={cs.coordinate_system} value={cs.coordinate_system}>
|
|
57
|
-
{
|
|
57
|
+
{/* Distinguish coordinate systems with the same name */}
|
|
58
|
+
{cs.name && store.coordSystemCountByName[cs.name] > 1
|
|
59
|
+
? `${cs.name} / ${cs.coordinate_system}`
|
|
60
|
+
: cs.name || cs.coordinate_system}
|
|
58
61
|
</MenuItem>
|
|
59
62
|
))}
|
|
60
63
|
</Select>
|
|
@@ -5,6 +5,7 @@ import type {
|
|
|
5
5
|
RobotTcp,
|
|
6
6
|
} from "@wandelbots/wandelbots-js"
|
|
7
7
|
import { tryParseJson } from "@wandelbots/wandelbots-js"
|
|
8
|
+
import { countBy } from "lodash-es"
|
|
8
9
|
import keyBy from "lodash-es/keyBy"
|
|
9
10
|
import uniqueId from "lodash-es/uniqueId"
|
|
10
11
|
import {
|
|
@@ -169,6 +170,10 @@ export class JoggingStore {
|
|
|
169
170
|
this.jogger.dispose()
|
|
170
171
|
}
|
|
171
172
|
|
|
173
|
+
get coordSystemCountByName() {
|
|
174
|
+
return countBy(this.coordSystems, (cs) => cs.name)
|
|
175
|
+
}
|
|
176
|
+
|
|
172
177
|
async deactivate(opts: { requireManualReactivation?: boolean } = {}) {
|
|
173
178
|
if (this.activationState === "inactive") return
|
|
174
179
|
const websocket = this.jogger.activeWebsocket
|
|
@@ -198,7 +203,6 @@ export class JoggingStore {
|
|
|
198
203
|
|
|
199
204
|
/** Activate the jogger with current settings */
|
|
200
205
|
async activate(opts: { manual?: boolean } = {}) {
|
|
201
|
-
console.log("activate!!")
|
|
202
206
|
if (this.manualActivationRequired && !opts.manual) return
|
|
203
207
|
|
|
204
208
|
runInAction(() => {
|