Skip to content

Commit 6d4e28b

Browse files
author
Ritika Mishra
committed
updated code to disable channel selection, timebase and resolved issue to shifting plot
1 parent d64cc48 commit 6d4e28b

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/components/Connection.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1818,20 +1818,20 @@ const Connection: React.FC<ConnectionProps> = ({
18181818
</PopoverTrigger>
18191819
<PopoverContent className="w-[30rem] p-4 rounded-md shadow-md text-sm">
18201820
<TooltipProvider>
1821-
<div className="space-y-6">
1821+
<div className={`space-y-6 ${!isDisplay ? "flex justify-center" : ""}`}>
18221822
{/* Channel Selection */}
18231823
{isDisplay && (
1824-
<div className="flex items-center justify-center rounded-lg mb-[2.5rem]">
1824+
<div className="flex items-center justify-center rounded-lg ">
18251825
<div className="w-full">
18261826
{/* Channels Count & Select All Button */}
1827-
<div className="flex items-center justify-between mb-4">
1827+
<div className="flex items-center justify-between ">
18281828
<h3 className="text-xs font-semibold text-gray-500">
18291829
<span className="font-bold text-gray-600">Channels Count:</span> {selectedChannels.length}
18301830
</h3>
18311831
{!(selectedChannels.length === maxCanvasElementCountRef.current && manuallySelected) && (
18321832
<button
18331833
onClick={handleSelectAllToggle}
1834-
className={`px-4 py-1 text-xs font-light rounded-lg transition ${isSelectAllDisabled
1834+
className={`px-4 py-1 text-xs font-light rounded-lg transition m-2 ${isSelectAllDisabled
18351835
? "text-gray-400 bg-gray-200 dark:bg-gray-700 dark:text-gray-500 cursor-not-allowed"
18361836
: "text-white bg-black hover:bg-gray-700 dark:bg-white dark:text-black dark:border dark:border-gray-500 dark:hover:bg-primary/70"
18371837
}`}
@@ -1887,8 +1887,9 @@ const Connection: React.FC<ConnectionProps> = ({
18871887
)}
18881888

18891889
{/* Zoom Controls */}
1890-
<div className="relative w-full flex flex-col items-start text-sm mb-[2rem]">
1891-
<p className="absolute top-[-1.2rem] left-0 text-xs font-semibold text-gray-500">
1890+
<div className={`relative w-full flex flex-col ${!isDisplay ? "" : "items-start"} text-sm`}>
1891+
{/* Zoom Level label positioned at top left with margin/padding */}
1892+
<p className="text-xs justify-start font-semibold text-gray-500 ">
18921893
<span className="font-bold text-gray-600">Zoom Level:</span> {Zoom}x
18931894
</p>
18941895
<div className="relative w-[28rem] flex items-center rounded-lg py-2 border border-gray-300 dark:border-gray-600 mb-4">
@@ -1926,8 +1927,8 @@ const Connection: React.FC<ConnectionProps> = ({
19261927

19271928
{/* Time-Base Selection */}
19281929
{isDisplay && (
1929-
<div className="relative w-full flex flex-col items-start mt-3 text-sm">
1930-
<p className="absolute top-[-1.2rem] left-0 text-xs font-semibold text-gray-500">
1930+
<div className="relative w-full flex flex-col items-start text-sm">
1931+
<p className="text-xs font-semibold text-gray-500 ">
19311932
<span className="font-bold text-gray-600">Time Base:</span> {timeBase} Seconds
19321933
</p>
19331934
<div className="relative w-[28rem] flex items-center rounded-lg py-2 border border-gray-300 dark:border-gray-600">
@@ -1956,11 +1957,10 @@ const Connection: React.FC<ConnectionProps> = ({
19561957
10
19571958
</button>
19581959
<style jsx>{` input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none;appearance: none; width: 15px; height: 15px;
1959-
background-color: rgb(101, 136, 205); border-radius: 50%; cursor: pointer; }`}</style>
1960+
background-color: rgb(101, 136, 205); border-radius: 50%; cursor: pointer; }`}</style>
19601961
</div>
19611962
</div>
19621963
)}
1963-
19641964
</div>
19651965
</TooltipProvider>
19661966
</PopoverContent>

0 commit comments

Comments
 (0)