preserve state of shape being edited during memo updates
This commit is contained in:
parent
7d4e50993f
commit
6ed2e47f1d
@ -198,6 +198,10 @@ export default function Whiteboard(props) {
|
||||
let changed = false;
|
||||
|
||||
if (next.pageStates[curPageId] && !_.isEqual(prevShapes, shapes)) {
|
||||
const editingShape = tldrawAPI?.getShape(tldrawAPI?.getPageState()?.editingId);
|
||||
if (editingShape) {
|
||||
shapes[editingShape?.id] = editingShape;
|
||||
}
|
||||
// set shapes as locked for those who aren't allowed to edit it
|
||||
Object.entries(shapes).forEach(([shapeId, shape]) => {
|
||||
if (!shape.isLocked && !hasShapeAccess(shapeId)) {
|
||||
|
Loading…
Reference in New Issue
Block a user