Skip to content

Commit d97b185

Browse files
authored
Merge pull request #33 from oslabs-beta/sean
updated debounce and live cursor size
2 parents b783a9b + 465ac79 commit d97b185

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

app/src/components/main/Canvas.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ function Canvas(props: {}): JSX.Element {
3939
setToggleText(toggleText === 'on' ? 'off' : 'on');
4040
};
4141

42-
// Prevents lagging and provides smoother user experience got live cursor tracking (milliseconds can be adjusted but 300ms is most optimal)
42+
// Prevents lagging and provides smoother user experience got live cursor tracking (milliseconds can be adjusted but 500ms is most optimal)
4343
const debounceSetPosition = debounce((newX, newY) => {
4444
//emit socket event every 300ms when cursor moves
4545
if (userList.length > 1)
4646
emitEvent('cursorData', roomCode, { x: newX, y: newY, userName });
47-
}, 300);
47+
}, 500);
4848

4949
const handleMouseMove = (e) => {
5050
debounceSetPosition(e.clientX, e.clientY);
@@ -355,7 +355,7 @@ function Canvas(props: {}): JSX.Element {
355355
left: cursor.x + 'px',
356356
top: cursor.y - 68 + 'px',
357357
//cursor style
358-
fontSize: '2em',
358+
fontSize: '1em',
359359
color: userColors[userList.indexOf(cursor.remoteUserName)]
360360
}}
361361
>

app/src/public/favicon.png

85.7 KB
Loading

app/src/public/icons/png/16x16.png

-612 Bytes
Binary file not shown.

app/src/public/index.ejs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
rel="stylesheet"
1717
href="https://fonts.googleapis.com/icon?family=Material+Icons"
1818
/>
19+
<link
20+
rel="icon"
21+
href="https://raw.githubusercontent.com/open-source-labs/ReacType/master/app/src/public/icons/png/512x512.png"
22+
/>
1923
</head>
2024
<body>
2125
<div id="app"></div>

0 commit comments

Comments
 (0)