mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-04-13 05:20:28 +08:00
refactor: update PointerSensor activation constraint to improve responsiveness
This commit is contained in:
parent
b177a1e192
commit
c429632d80
@ -70,7 +70,11 @@ const DEFAULT_TEST_LIST = [
|
||||
|
||||
export const TestCard = () => {
|
||||
const { t } = useTranslation();
|
||||
const sensors = useSensors(useSensor(PointerSensor));
|
||||
const sensors = useSensors(
|
||||
useSensor(PointerSensor, {
|
||||
activationConstraint: { distance: 8 },
|
||||
}),
|
||||
);
|
||||
const { verge, mutateVerge, patchVerge } = useVerge();
|
||||
const viewerRef = useRef<TestViewerRef>(null);
|
||||
|
||||
|
||||
@ -189,7 +189,9 @@ export const GroupsEditorViewer = (props: Props) => {
|
||||
);
|
||||
|
||||
const sensors = useSensors(
|
||||
useSensor(PointerSensor),
|
||||
useSensor(PointerSensor, {
|
||||
activationConstraint: { distance: 8 },
|
||||
}),
|
||||
useSensor(KeyboardSensor, {
|
||||
coordinateGetter: sortableKeyboardCoordinates,
|
||||
}),
|
||||
|
||||
@ -85,7 +85,9 @@ export const ProxiesEditorViewer = (props: Props) => {
|
||||
);
|
||||
|
||||
const sensors = useSensors(
|
||||
useSensor(PointerSensor),
|
||||
useSensor(PointerSensor, {
|
||||
activationConstraint: { distance: 8 },
|
||||
}),
|
||||
useSensor(KeyboardSensor, {
|
||||
coordinateGetter: sortableKeyboardCoordinates,
|
||||
}),
|
||||
|
||||
@ -296,7 +296,9 @@ export const RulesEditorViewer = (props: Props) => {
|
||||
);
|
||||
|
||||
const sensors = useSensors(
|
||||
useSensor(PointerSensor),
|
||||
useSensor(PointerSensor, {
|
||||
activationConstraint: { distance: 8 },
|
||||
}),
|
||||
useSensor(KeyboardSensor, {
|
||||
coordinateGetter: sortableKeyboardCoordinates,
|
||||
}),
|
||||
|
||||
@ -277,7 +277,9 @@ export const ProxyChain = ({
|
||||
}, [proxyChain.length, markUnsavedChanges]);
|
||||
|
||||
const sensors = useSensors(
|
||||
useSensor(PointerSensor),
|
||||
useSensor(PointerSensor, {
|
||||
activationConstraint: { distance: 8 },
|
||||
}),
|
||||
useSensor(KeyboardSensor, {
|
||||
coordinateGetter: sortableKeyboardCoordinates,
|
||||
}),
|
||||
|
||||
@ -163,7 +163,9 @@ const ProfilePage = () => {
|
||||
[],
|
||||
);
|
||||
const sensors = useSensors(
|
||||
useSensor(PointerSensor),
|
||||
useSensor(PointerSensor, {
|
||||
activationConstraint: { distance: 8 },
|
||||
}),
|
||||
useSensor(KeyboardSensor, {
|
||||
coordinateGetter: sortableKeyboardCoordinates,
|
||||
}),
|
||||
|
||||
@ -31,7 +31,9 @@ import { useVerge } from "@/hooks/use-verge";
|
||||
const TestPage = () => {
|
||||
const { t } = useTranslation();
|
||||
const sensors = useSensors(
|
||||
useSensor(PointerSensor),
|
||||
useSensor(PointerSensor, {
|
||||
activationConstraint: { distance: 8 },
|
||||
}),
|
||||
useSensor(KeyboardSensor, {
|
||||
coordinateGetter: sortableKeyboardCoordinates,
|
||||
}),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user