refactor: make draggedDocIds a required property in PointerDownOptions and simplify handlePointerDown logic accordingly

This commit is contained in:
2025-11-25 21:04:54 +01:00
parent e0fce40bc3
commit 5accfb4339
2 changed files with 8 additions and 16 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ import React, {
import { resolveDocumentAssetUrl } from '../asset_manager';
import type { GetAsset } from '../asset_manager';
import { formatTransform } from '../utils/math';
import useDocumentDrag from './useDocumentDrag';
import useDocumentDrag, { PointerDownOptions } from './useDocumentDrag';
import PreviewZoomOverlay from '../detail/PreviewZoomOverlay';
import {
WorkspaceEngine,
@@ -894,7 +894,7 @@ function DesktopWorkspaceView({
onDocumentActivate: handleDeskDocumentActivate,
markLayoutDirty,
}) as {
handlePointerDown: React.PointerEventHandler<HTMLElement>;
handlePointerDown: (event: React.PointerEvent<HTMLElement>, docId: Identifier | null, options: PointerDownOptions) => void;
handlePointerMove: React.PointerEventHandler<HTMLElement>;
handlePointerUp: React.PointerEventHandler<HTMLElement>;
handlePointerCancel: React.PointerEventHandler<HTMLElement>;