chore(core): some dnd events (#9206)

fix AF-1999
This commit is contained in:
pengx17
2024-12-19 07:42:13 +00:00
parent 30588783ef
commit da0f3d0b56
11 changed files with 104 additions and 24 deletions

View File

@@ -22,6 +22,7 @@ import { JournalService } from '@affine/core/modules/journal';
import { ViewIcon, ViewTitle } from '@affine/core/modules/workbench';
import type { AffineDNDData } from '@affine/core/types/dnd';
import { useI18n } from '@affine/i18n';
import { track } from '@affine/track';
import type { Doc } from '@blocksuite/affine/store';
import { useLiveData, useService, type Workspace } from '@toeverything/infra';
import { forwardRef, useCallback, useEffect, useRef, useState } from 'react';
@@ -187,6 +188,9 @@ export function DetailPageHeader(
id: page.id,
},
},
onDragStart: () => {
track.$.header.$.dragStart();
},
dragPreviewPosition: 'pointer-outside',
};
}, [page.id]);