add transitions to cursors for smoothing

This commit is contained in:
KDSBrowne 2023-11-08 00:20:59 +00:00
parent 693183291d
commit c7149c931b

View File

@ -25,6 +25,8 @@ const Cursor = (props) => {
_y = (y + tldrawCamera?.point[1]) * tldrawCamera?.zoom;
}
const transitionStyle = owner ? { transition: 'left 0.3s ease-out, top 0.3s ease-out' } : {};
return (
<>
<div
@ -38,6 +40,7 @@ const Cursor = (props) => {
borderRadius: '50%',
background: `${color}`,
pointerEvents: 'none',
...transitionStyle,
}}
/>
@ -57,6 +60,7 @@ const Cursor = (props) => {
color: '#FFF',
backgroundColor: color,
border: `1px solid ${color}`,
...transitionStyle,
}}
data-test="whiteboardCursorIndicator"
>