Merge branch 'final-demo' of https://git.tjdev.de/thi-sjsu-project/react-redux-app into final-demo

This commit is contained in:
bedlam343 2024-06-04 03:01:26 -07:00
commit 5d2c600f63
4 changed files with 38 additions and 14 deletions

View File

@ -11,7 +11,31 @@
</head>
<body oncontextmenu="return false;">
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<div style="width: 1920px; height: 1920px;" id="gaze-div">
<div class="absolute cursor-none rounded-full ring-4 ring-blue-400 bg-blue-400 bg-opacity-20" style="z-index: 2000; width: 100px; height: 100px; display: none;" id="gaze-circle"></div>
</div>
<div id="root" style="margin-top: -1920px;"></div>
<script type="module" src="/src/main.tsx"></script>
<script>
const gazeCircle = document.getElementById("gaze-circle");
window.addEventListener("mousemove", function (ev) {
gazeCircle.style.left = `${ev.clientX - 50}px`;
gazeCircle.style.top = `${ev.clientY - 50}px`;
});
window.addEventListener("mouseout", function (ev) {
if (ev.toElement == null && ev.relatedTarget == null) {
gazeCircle.style.display = "none";
}
});
window.addEventListener("mouseover", function (ev) {
if (ev.toElement == null && ev.relatedTarget == null) {
gazeCircle.style.display = "block";
}
});
if (window.location.toString().indexOf("/prototype") >= 0) {
document.getElementById("gaze-div").style.display = "none";
document.getElementById("root").style.marginTop = "0px";
}
</script>
</body>
</html>

View File

@ -33,7 +33,7 @@ const Minimap = () => {
<Widget key={widgetId} widget={widgets[widgetId]} />
))}
</div>
<StressLevelIndicator />
{/* <StressLevelIndicator /> */}
</>
);
};

View File

@ -13,17 +13,17 @@ const Gaze = ({ mousePosition }: GazeProps) => {
// Don't render the gaze if the cursor is outside screen
if (x - GAZE_RADIUS > width || y - GAZE_RADIUS > height) return null;
return (
<div
className={`cursor-none absolute rounded-full ring-4 ring-blue-400 z-50 bg-blue-400 bg-opacity-20`}
style={{
width: GAZE_RADIUS * 2,
height: GAZE_RADIUS * 2,
top: y - GAZE_RADIUS,
left: x - GAZE_RADIUS,
zIndex: '2000'
}}
/>
return ( <></>
// <div
// className={`cursor-none absolute rounded-full ring-4 ring-blue-400 z-50 bg-blue-400 bg-opacity-20`}
// style={{
// width: GAZE_RADIUS * 2,
// height: GAZE_RADIUS * 2,
// top: y - GAZE_RADIUS,
// left: x - GAZE_RADIUS,
// zIndex: '2000'
// }}
// />
);
};

@ -1 +1 @@
Subproject commit ce12c3c5617c1dd30124481e795b6791daa7f3b0
Subproject commit e92d57ab4226c46e97bdd5164f8121db67caf808