ux
This commit is contained in:
@@ -54,25 +54,18 @@ const useDocumentDrag = (options = {}) => {
|
||||
|
||||
const tapHandler = usePointerTap({
|
||||
delay: 220,
|
||||
onSingle: ({ data, event }) => {
|
||||
if (!data || !data.docId) {
|
||||
return;
|
||||
}
|
||||
if (event && (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)) {
|
||||
return;
|
||||
}
|
||||
if (typeof onInspectDocument === 'function') {
|
||||
onInspectDocument(data.docId);
|
||||
}
|
||||
},
|
||||
onSingle: () => {},
|
||||
onDouble: ({ data, event }) => {
|
||||
if (!data || !data.docId) {
|
||||
return;
|
||||
}
|
||||
if (event && (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)) {
|
||||
if (event?.altKey) {
|
||||
openOverlayForDoc(data.docId, data.originInfo);
|
||||
return;
|
||||
}
|
||||
openOverlayForDoc(data.docId, data.originInfo);
|
||||
if (typeof onInspectDocument === 'function') {
|
||||
onInspectDocument(data.docId, event);
|
||||
}
|
||||
},
|
||||
});
|
||||
const dragStateRef = useRef(null);
|
||||
|
||||
Reference in New Issue
Block a user