feat: Implement Z-index-aware click behavior for selected documents and add group gravitation to document drag.

This commit is contained in:
2025-11-25 21:55:52 +01:00
parent 45ff3fb9ac
commit c4603a0b3a
4 changed files with 100 additions and 30 deletions
+5 -1
View File
@@ -795,7 +795,10 @@ const DesktopWorkspace: React.FC<DocumentsViewProps> = ({
? descriptorOrDescriptors
: [descriptorOrDescriptors];
const keys = descriptors
.map((d: any) => getDocEntryKey(d.id))
.map((d: any) => {
const id = typeof d === 'string' ? d : d?.id;
return getDocEntryKey(id);
})
.filter((k: any) => k);
if (keys.length > 0) {
@@ -893,6 +896,7 @@ function DesktopWorkspaceView({
containerRef,
onDocumentActivate: handleDeskDocumentActivate,
markLayoutDirty,
onSelect,
}) as {
handlePointerDown: (event: React.PointerEvent<HTMLElement>, docId: Identifier | null, options: PointerDownOptions) => void;
handlePointerMove: React.PointerEventHandler<HTMLElement>;