solved few bugs in agv

This commit is contained in:
2025-04-04 09:46:18 +05:30
parent 1dc04d19bb
commit 37f912a6f1
4 changed files with 130 additions and 58 deletions

View File

@@ -1,6 +1,7 @@
import React, { useState, useRef, useEffect } from "react";
import { ExitIcon, PlayStopIcon, ResetIcon } from "../../icons/SimulationIcons";
import { usePlayButtonStore } from "../../../store/usePlayButtonStore";
import { useActiveTool } from "../../../store/store";
const SimulationPlayer: React.FC = () => {
const [speed, setSpeed] = useState<number>(1);
@@ -8,6 +9,7 @@ const SimulationPlayer: React.FC = () => {
const { setIsPlaying } = usePlayButtonStore();
const sliderRef = useRef<HTMLDivElement>(null);
const isDragging = useRef(false);
const { setActiveTool } = useActiveTool();
// Button functions
const handleReset = () => {
@@ -19,6 +21,7 @@ const SimulationPlayer: React.FC = () => {
const handleExit = () => {
setPlaySimulation(false);
setIsPlaying(false);
setActiveTool("cursor")
};
// Slider functions starts