[fix] laser pointer (#1429)

This PR makes two improvements to the laser pointer:
- it increases the opacity of collaborator lasers
- it fixes a case where a scribble could have no points

### Change Type

- [x] `patch` — Bug Fix
This commit is contained in:
Steve Ruiz 2023-05-22 14:11:47 +01:00 committed by GitHub
parent cbbc0abcc6
commit 97ffc168c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -19,6 +19,8 @@ export const DefaultScribble: TLScribbleComponent = ({
opacity,
className,
}) => {
if (!scribble.points.length) return
const d = getSvgPathFromStroke(
getStroke(scribble.points, {
size: scribble.size / zoom,

View file

@ -82,7 +82,7 @@ const Collaborator = track(function Collaborator({ userId }: { userId: TLUserId
scribble={scribble}
color={color}
zoom={zoomLevel}
opacity={0.1}
opacity={scribble.color === 'laser' ? 0.5 : 0.1}
/>
) : null}
{CollaboratorShapeIndicator &&