add transitions to cursors for smoothing
This commit is contained in:
parent
693183291d
commit
c7149c931b
@ -25,6 +25,8 @@ const Cursor = (props) => {
|
|||||||
_y = (y + tldrawCamera?.point[1]) * tldrawCamera?.zoom;
|
_y = (y + tldrawCamera?.point[1]) * tldrawCamera?.zoom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const transitionStyle = owner ? { transition: 'left 0.3s ease-out, top 0.3s ease-out' } : {};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
@ -38,6 +40,7 @@ const Cursor = (props) => {
|
|||||||
borderRadius: '50%',
|
borderRadius: '50%',
|
||||||
background: `${color}`,
|
background: `${color}`,
|
||||||
pointerEvents: 'none',
|
pointerEvents: 'none',
|
||||||
|
...transitionStyle,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@ -57,6 +60,7 @@ const Cursor = (props) => {
|
|||||||
color: '#FFF',
|
color: '#FFF',
|
||||||
backgroundColor: color,
|
backgroundColor: color,
|
||||||
border: `1px solid ${color}`,
|
border: `1px solid ${color}`,
|
||||||
|
...transitionStyle,
|
||||||
}}
|
}}
|
||||||
data-test="whiteboardCursorIndicator"
|
data-test="whiteboardCursorIndicator"
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user