Skip to content

Commit

Permalink
hide the original picture
Browse files Browse the repository at this point in the history
  • Loading branch information
CloudLun committed Mar 23, 2024
1 parent b3f3fe6 commit 781cc77
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions components/narrative/Narrative.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ const Narrative = () => {
{
openNarrative && (
<>
<img src="/logos/floodgen_logo_white.png" className="absolute left-8 top-6 w-[155px] h-[38.75px] z-[999]" alt="logos_white" />
<img src="/logos/floodgen_logo_white.png" className="absolute left-8 top-6 w-[155px] h-[38.75px] z-[999] " alt="logos_white" onScroll={() => console.log('aa')}/>
<div className="absolute right-8 top-6 flex items-center justify-center w-[35px] h-[35px] bg-[#E7E7E7] bg-opacity-60 rounded-full z-[999] cursor-pointer">
<XMarkIcon width={24} height={24} className=" text-black font-thin " onClick={clickHandler} />
</div>
<div className="absolute top-0 left-0 z-50 w-full h-full overflow-y-auto">
<Introduction />
<Satellite />
<StreetView />
{/* <StreetView /> */}
<Slider />
<Ending clickHandler={clickHandler}/>
</div>
Expand Down
7 changes: 5 additions & 2 deletions components/narrative/Slider.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
"use client";

import Image from "next/image";
import { useState } from "react";
import { useState, useRef, useEffect } from "react";
import { ChevronLeftIcon, ChevronRightIcon } from "@heroicons/react/16/solid";

const Slider = () => {
const [sliderPosition, setSliderPosition] = useState(50);
const [isDragging, setIsDragging] = useState(false);

const ref = useRef()

const handleMove = (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => {
if (!isDragging) return;

Expand All @@ -26,8 +28,9 @@ const Slider = () => {
setIsDragging(false);
};


return (
<div className="w-full h-[100vh] bg-white relative" onMouseUp={handleMouseUp}>
<div className="w-full h-[100vh] bg-white relative" onMouseUp={handleMouseUp} >
<div
className="relative w-full h-full overflow-hidden select-none"
onMouseMove={handleMove}
Expand Down

0 comments on commit 781cc77

Please sign in to comment.