mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
add comments
This commit is contained in:
parent
1419f17175
commit
a0669f874e
2 changed files with 12 additions and 0 deletions
|
@ -3,6 +3,9 @@ import {
|
|||
MutableExcalidrawTextElement,
|
||||
} from "./types";
|
||||
|
||||
// This function tracks updates of text elements for the purposes for collaboration.
|
||||
// The version is used to compare updates when more than one user is working in
|
||||
// the same drawing.
|
||||
export function mutateElement(
|
||||
element: MutableExcalidrawElement,
|
||||
callback: (mutatableElement: MutableExcalidrawElement) => void,
|
||||
|
@ -11,6 +14,9 @@ export function mutateElement(
|
|||
callback(element);
|
||||
}
|
||||
|
||||
// This function tracks updates of text elements for the purposes for collaboration.
|
||||
// The version is used to compare updates when more than one user is working in
|
||||
// the same document.
|
||||
export function mutateTextElement(
|
||||
element: MutableExcalidrawTextElement,
|
||||
callback: (mutatableElement: MutableExcalidrawTextElement) => void,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue