@wandelbots/wandelbots-js-react-components 2.40.0-pr.feature-seperate-timer.383.c9c6f2b → 2.40.0-pr.feature-seperate-timer.383.0494cf4
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wandelbots/wandelbots-js-react-components",
|
|
3
|
-
"version": "2.40.0-pr.feature-seperate-timer.383.
|
|
3
|
+
"version": "2.40.0-pr.feature-seperate-timer.383.0494cf4",
|
|
4
4
|
"description": "React UI toolkit for building applications on top of the Wandelbots platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -134,21 +134,20 @@ export const useTimerLogic = ({
|
|
|
134
134
|
)
|
|
135
135
|
|
|
136
136
|
const completeMeasuring = useCallback(() => {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
137
|
+
// Always trigger completion regardless of current state
|
|
138
|
+
setTimerState((prev) => ({
|
|
139
|
+
...prev,
|
|
140
|
+
isRunning: false,
|
|
141
|
+
currentState: "measured",
|
|
142
|
+
}))
|
|
143
|
+
startTimeRef.current = null
|
|
144
144
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}, [timerState.currentState, onStartPulsating, onMeasuringComplete])
|
|
145
|
+
onStartPulsating(() => {
|
|
146
|
+
if (onMeasuringComplete) {
|
|
147
|
+
onMeasuringComplete()
|
|
148
|
+
}
|
|
149
|
+
})
|
|
150
|
+
}, [onStartPulsating, onMeasuringComplete])
|
|
152
151
|
|
|
153
152
|
const pause = useCallback(() => {
|
|
154
153
|
if (startTimeRef.current && timerState.isRunning) {
|