-
Notifications
You must be signed in to change notification settings - Fork 427
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
The pm: snapdrag event does not fire after clicking at the moment of intersection #800
Comments
@jCodeX1 I fixed this, it will be in the next Release. Thx for reporting. But I think that for your use |
@Falke-Design thx ) |
@Falke-Design I'm sorry, but I tried this.editLayer
.on('pm:enable', (e) => {
this.onEditModeEnabledHook(e);
})
.on('pm:snapdrag', (e) => {
console.log('snapdrag', e);
this.onEditVertexMoved(e);
})
.on('pm:markerdrag', (e) => {
console.log('markerdrag', e);
})
.on('pm:vertexremoved', (e) => {
this.onEditVertexRemoved(e);
})
.pm
.enable({ allowSelfIntersection: false }); |
@jCodeX1 look into this example: https://jsfiddle.net/falkedesign/6z1f83L5/ Are you using the latest version of Geoman? 2.9.0 |
@Falke-Design version 2.7.0 🤔 |
I suggest you to update, we implemented this in the latest version |
@Falke-Design what should I update? if I don't have a geoman, I understand that it is included in the leaflet package |
You need to update Geoman. This has nothing to do with Leaflet core. Update npm: |
@Falke-Design yes i did it but the version (L.PM.version) hasn't changed |
Are you using NPM? |
Yes, the addiction has appeared, but the version has not changed My code: console.log(L.PM.version);
this.editLayer
.on('pm:enable', (e) => {
this.onEditModeEnabledHook(e);
})
.on('pm:snapdrag', (e) => {
this.onEditVertexMoved(e);
})
.on('pm:markerdrag', (e) => {
console.log('markerdrag', e);
})
.on('pm:vertexremoved', (e) => {
this.onEditVertexRemoved(e);
})
.pm
.enable({ allowSelfIntersection: false }); |
This is weird ... Maybe it is one of the following points:
|
@Falke-Design Unfortunately, yes, I did all the options listed many times, but this did not solve my problem ( |
This is my L.PM object, maybe it can help somehow |
Maybe you are using Geoman twice ... have you included in your html Geoman directly? Or have you downloaded it anywhere instead of using npm? Maybe you can search through your complete project, search for |
@Falke-Design I performed the following operations, and then I wrote npm install, and that's it, I expected it to work |
So it is working now? |
@Falke-Design Yes, fine, I defeated the problem 😌 it was that the geoman was connected via html in my code, I removed that and imported a new plugin, now everything is fine!) |
Nice to hear! I let this issue open until the fix for |
@Falke-Design one more question, after crossing my faces take their original form, but at the same time I do not know which hook to use to get the event after returning the figure to a valid view, is there any hook for changing the figure as a whole? |
You can listen on |
@Falke-Design a little wrong, when crossing, dragging ends, and I still have coordinates (for example, NN coordinates), but after dragging in the intersection, when I release the mouse button, the figure takes on a new view (with coordinates for example N1-N2), as a result, I save the coordinates NN , but about the new coordinates N1-N2, I don’t know, how can I handle this case? |
@Falke-Design |
Yes you are right ... This is the order of events, maybe this helps you:
|
@Falke-Design The problem is that pm: intersect only fires when I made an intersection (after releasing the mouse button, it won't work), and |
Good day, I ran into a problem, the solution to which I cannot find.
I have a tooltip that shows the area of a plot, changing it is called on the pm: snapdrag event. But the problem is that if you make an intersection and click on the mouse button to save the area, then the pm: snapdrag event stops generating exactly until I let’s say I do not create a new point for the site. I am attaching a video with a demo. I would be grateful for your help!
20210301-130824-598.mp4
The text was updated successfully, but these errors were encountered: