@wandelbots/wandelbots-js-react-components 1.33.1 → 1.33.3
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/JoggingCartesianAxisControl.d.ts.map +1 -1
- package/dist/components/jogging/JoggingCartesianTab.d.ts.map +1 -1
- package/dist/components/robots/KUKA_KR16_R2010_2.d.ts +1 -0
- package/dist/components/robots/KUKA_KR16_R2010_2.d.ts.map +1 -1
- package/dist/index.cjs +16 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +935 -926
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/jogging/JoggingCartesianAxisControl.tsx +11 -3
- package/src/components/jogging/JoggingCartesianTab.tsx +5 -0
- package/src/components/robots/KUKA_KR16_R2010_2.tsx +1 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IconButton, Typography, useTheme } from "@mui/material"
|
|
2
2
|
import Stack from "@mui/material/Stack"
|
|
3
3
|
import { observer } from "mobx-react-lite"
|
|
4
|
-
import React, { useRef, useState, type ReactNode } from "react"
|
|
4
|
+
import React, { useEffect, useRef, useState, type ReactNode } from "react"
|
|
5
5
|
import { externalizeComponent } from "../../externalizeComponent"
|
|
6
6
|
import JogMinus from "../../icons/jog-minus.svg"
|
|
7
7
|
import JogPlus from "../../icons/jog-plus.svg"
|
|
@@ -45,6 +45,14 @@ export const JoggingCartesianAxisControl = externalizeComponent(
|
|
|
45
45
|
const [localActiveJoggingDirection, setLocalActiveJoggingDirection] =
|
|
46
46
|
useState<JoggingDirection | null>(null)
|
|
47
47
|
|
|
48
|
+
// Trigger pointer "release" events because e.g. firefox does not trigger pointer events as soon as a component is disabled
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
if (!disabled) {
|
|
51
|
+
return
|
|
52
|
+
}
|
|
53
|
+
onPointerUpOrOut()
|
|
54
|
+
}, [disabled])
|
|
55
|
+
|
|
48
56
|
// Handle both controlled and uncontrolled states
|
|
49
57
|
const showJoggingDirection =
|
|
50
58
|
activeJoggingDirection || localActiveJoggingDirection
|
|
@@ -83,10 +91,10 @@ export const JoggingCartesianAxisControl = externalizeComponent(
|
|
|
83
91
|
const sxAxisControlButtonDefault = {
|
|
84
92
|
...sxAxisControlButtonBase,
|
|
85
93
|
backgroundColor: colors.buttonBackgroundColor?.default,
|
|
86
|
-
"
|
|
94
|
+
":hover": {
|
|
87
95
|
backgroundColor: colors.buttonBackgroundColor?.hovered,
|
|
88
96
|
},
|
|
89
|
-
"
|
|
97
|
+
":active": {
|
|
90
98
|
backgroundColor: colors.buttonBackgroundColor?.pressed,
|
|
91
99
|
color: colors.backgroundColor,
|
|
92
100
|
path: { fill: colors.backgroundColor },
|
|
@@ -250,6 +250,11 @@ export const JoggingCartesianTab = observer(
|
|
|
250
250
|
key={axis.id}
|
|
251
251
|
colors={axis.colors}
|
|
252
252
|
disabled={store.isLocked}
|
|
253
|
+
activeJoggingDirection={
|
|
254
|
+
store.incrementJogInProgress?.axis === axis.id
|
|
255
|
+
? store.incrementJogInProgress.direction
|
|
256
|
+
: undefined
|
|
257
|
+
}
|
|
253
258
|
label={
|
|
254
259
|
<>
|
|
255
260
|
<RotationIcon />
|