mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: deduplicate collab avatars based on id
(#5309)
This commit is contained in:
parent
ec35d5db51
commit
5feacd9a3b
7 changed files with 54 additions and 48 deletions
|
@ -31,16 +31,7 @@ export const actionGoToCollaborator = register({
|
|||
};
|
||||
},
|
||||
PanelComponent: ({ appState, updateData, data }) => {
|
||||
const clientId: string | undefined = data?.id;
|
||||
if (!clientId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const collaborator = appState.collaborators.get(clientId);
|
||||
|
||||
if (!collaborator) {
|
||||
return null;
|
||||
}
|
||||
const [clientId, collaborator] = data as [string, Collaborator];
|
||||
|
||||
const { background, stroke } = getClientColors(clientId, appState);
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ import {
|
|||
ExcalidrawProps,
|
||||
BinaryFiles,
|
||||
} from "../types";
|
||||
import { ToolButtonSize } from "../components/ToolButton";
|
||||
|
||||
export type ActionSource = "ui" | "keyboard" | "contextMenu" | "api";
|
||||
|
||||
|
@ -119,7 +118,7 @@ export type PanelComponentProps = {
|
|||
appState: AppState;
|
||||
updateData: (formData?: any) => void;
|
||||
appProps: ExcalidrawProps;
|
||||
data?: Partial<{ id: string; size: ToolButtonSize }>;
|
||||
data?: Record<string, any>;
|
||||
};
|
||||
|
||||
export interface Action {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue