[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
pull/1397/head
Steve Ruiz 2023-05-22 14:11:47 +01:00 zatwierdzone przez GitHub
rodzic cbbc0abcc6
commit 97ffc168c1
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -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,

Wyświetl plik

@ -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 &&