conflicts removed
This commit is contained in:
parent
40589b2fd8
commit
f69b601785
|
@ -1,5 +1,8 @@
|
||||||
import React, { useEffect, useRef, useState, useCallback } from "react";
|
import React, { useEffect, useRef, useState, useCallback } from "react";
|
||||||
import { Widget } from "../../../store/useWidgetStore";
|
import { Widget } from "../../../store/useWidgetStore";
|
||||||
|
import { MoveArrowLeft, MoveArrowRight } from "../../icons/SimulationIcons";
|
||||||
|
import { InfoIcon } from "../../icons/ExportCommonIcons";
|
||||||
|
import { useDroppedObjectsStore } from "../../../store/useDroppedObjectsStore";
|
||||||
|
|
||||||
// Define the type for `Side`
|
// Define the type for `Side`
|
||||||
type Side = "top" | "bottom" | "left" | "right";
|
type Side = "top" | "bottom" | "left" | "right";
|
||||||
|
@ -60,16 +63,12 @@ const DisplayZone: React.FC<DisplayZoneProps> = ({
|
||||||
// Ref for the container element
|
// Ref for the container element
|
||||||
const containerRef = useRef<HTMLDivElement | null>(null);
|
const containerRef = useRef<HTMLDivElement | null>(null);
|
||||||
|
|
||||||
// Example state for selectedOption and options (adjust based on your actual use case)
|
// State to track overflow visibility
|
||||||
const [selectedOption, setSelectedOption] = React.useState<string | null>(
|
const [showLeftArrow, setShowLeftArrow] = useState(false);
|
||||||
null
|
const [showRightArrow, setShowRightArrow] = useState(false);
|
||||||
);
|
|
||||||
// console.log('setSelectedOption: ', setSelectedOption);
|
|
||||||
const [options, setOptions] = React.useState<string[]>([]);
|
|
||||||
// console.log('setOptions: ', setOptions);
|
|
||||||
|
|
||||||
// Scroll to the selected option when it changes
|
// Function to calculate overflow state
|
||||||
useEffect(() => {
|
const updateOverflowState = useCallback(() => {
|
||||||
const container = containerRef.current;
|
const container = containerRef.current;
|
||||||
|
|
||||||
if (container) {
|
if (container) {
|
||||||
|
@ -165,7 +164,7 @@ const DisplayZone: React.FC<DisplayZoneProps> = ({
|
||||||
selectedZone.zoneName === zoneName ? "active" : ""
|
selectedZone.zoneName === zoneName ? "active" : ""
|
||||||
}`}
|
}`}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
console.log("zoneName: ", zoneName);
|
useDroppedObjectsStore.getState().setZone(zoneName, zonesData[zoneName]?.zoneId);
|
||||||
setSelectedZone({
|
setSelectedZone({
|
||||||
zoneName,
|
zoneName,
|
||||||
activeSides: zonesData[zoneName].activeSides || [],
|
activeSides: zonesData[zoneName].activeSides || [],
|
||||||
|
|
Loading…
Reference in New Issue