docs: remove dragging threshold when interacting with custom elements (#5240)
This commit is contained in:
parent
d08179c215
commit
269fbcc2f3
@ -10,7 +10,7 @@ import {
|
||||
withBatchedUpdates,
|
||||
withBatchedUpdatesThrottled,
|
||||
} from "../../../utils";
|
||||
import { DRAGGING_THRESHOLD, EVENT } from "../../../constants";
|
||||
import { EVENT } from "../../../constants";
|
||||
import { distance2d } from "../../../math";
|
||||
import { fileOpen } from "../../../data/filesystem";
|
||||
import { loadSceneOrLibraryFromBlob } from "../../utils";
|
||||
@ -264,13 +264,6 @@ export default function App() {
|
||||
|
||||
const onPointerMoveFromPointerDownHandler = (pointerDownState) => {
|
||||
return withBatchedUpdatesThrottled((event) => {
|
||||
const distance = distance2d(
|
||||
pointerDownState.x,
|
||||
pointerDownState.y,
|
||||
event.clientX,
|
||||
event.clientY,
|
||||
);
|
||||
if (distance > DRAGGING_THRESHOLD) {
|
||||
const { x, y } = viewportCoordsToSceneCoords(
|
||||
{
|
||||
clientX: event.clientX - pointerDownState.hitElementOffsets.x,
|
||||
@ -286,7 +279,6 @@ export default function App() {
|
||||
y,
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
const onPointerUpFromPointerDownHandler = (pointerDownState) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user