-
-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vue 3 Diagram Editor: click and drag #690
Comments
use dragStart with mousedown event @mousedown="selectItem(item, $event)"
selectItem(item, e) {
target = ...;
nextTick(() => {
moveable.dragStart(e);
});
} |
Thank you @daybrush, it is working fine!! I have Another question about the resize: if you resize using the top-middle handle you see that is a bit 'strange' the way the resize is happening (at least not the way you expect, i.e., the Y position should change together with the shape height). During the resizing there is a way to know which handle is using the user to resize the shape, so I can adjust x/y/w/h accordingly ? |
this is like a bug It will be fixed in the next release. |
ok thank you for your reply, any plan when this new release will be available? |
Maybe this week. |
moveable's new version is released. stopped mousedown propagation. |
Hello @daybrush, thank you for the update. When I upgraded the vue3-moveable to 0.6.0 I am getting this Vite error:
Before the upgrade these was the packages I was using:
after the upgrade:
Globally I am also using Vue 3 (v. 3.2.25) and VueUse (v 8.6.0). I also tried to remove completely the node_modules folder and install all from scratch... but I got the same error. NOTE: checking the node_modules/moveable folder I see that there is not 'dist' folder inside... just the 'src' one, this is why Vite is not able to resolve anymore the moveable module., while in the related packages.json you are referencing ./dist/* files...:
I also noted that the 'declaration' folder is not there as well. |
Solved the issues after several iterations. Here the details: #700 |
Environments
Description
I'm creating a Vue 3 diagram editor: user can add different node types (shapes, lines, images ,and virtually any Vue component can be a node). Users can also add interactively connections between 2 nodes, etc.
When I have to 'interact' (move, resize, rotate, etc.) I have first to click the node (to select it) and then doing the move/resize/rotate action I want.
How can i click and immediately drag the node? I linked a codesandbox so you can play with the real app.
https://codesandbox.io/s/nifty-euclid-8niqo1
The text was updated successfully, but these errors were encountered: