mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Add user list component + snap to user functionality (#1749)
This commit is contained in:
parent
8f65e37dac
commit
ca87ca6fe9
18 changed files with 333 additions and 32 deletions
|
@ -101,7 +101,11 @@ export class ActionManager implements ActionsManagerInterface {
|
|||
}));
|
||||
}
|
||||
|
||||
renderAction = (name: ActionName) => {
|
||||
// Id is an attribute that we can use to pass in data like keys.
|
||||
// This is needed for dynamically generated action components
|
||||
// like the user list. We can use this key to extract more
|
||||
// data from app state. This is an alternative to generic prop hell!
|
||||
renderAction = (name: ActionName, id?: string) => {
|
||||
if (this.actions[name] && "PanelComponent" in this.actions[name]) {
|
||||
const action = this.actions[name];
|
||||
const PanelComponent = action.PanelComponent!;
|
||||
|
@ -120,6 +124,7 @@ export class ActionManager implements ActionsManagerInterface {
|
|||
elements={this.getElementsIncludingDeleted()}
|
||||
appState={this.getAppState()}
|
||||
updateData={updateData}
|
||||
id={id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue