Open STO-2D opened 1 year ago
@STO-2D
Request is disabled with the Guideline function.
Perhaps the same example as you would be as follows:
AAA.addEventListener("mousedown", e => {
moveable.waitToChangeTarget().then(() => {
moveable. dragStart(inputEvent);
});
// react
setTarget(targets);
// vanilla
moveable. target = targets;
});
https://daybrush.com/moveable/storybook2/?path=/story/combination-with-other-components--use-selecto
@daybrush thanks MOVEABLE.dragStart(e);
is working great. This is exactly what I expected. Awesome!
@STO-2D Can you give us a rough explanation how you implemented this panel with the available elements? As I can see, when you have a mouse down event on the container image, you create a new draggable element that goes directly into the "dragging" state and follows your mouse. But what exactly happens, when you move it into the main area? Thanks!
Environments
Description
I want to drag something into the scene and make the newly added "object" instantly draggable. Therefore I call the request method on draggable. Whenever I move my mouse I call the requester request function with the coordinates to move onto.
In the video you can see when i drag a container into the scene - no guidelines are available. When dragging a container which was already placed in the scene it works perfectly fine.
https://user-images.githubusercontent.com/71387364/220947862-574482be-e996-4968-bf3f-d5d53e66982b.mp4