You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered the problem of a large number of dead points in page editing when using the latest leaf-geoman version. I tried to solve the problem in the demo and found that the enableGlobalEditMode method parameter passed options: {limitMarkersToCount: 20, allowSelfIntersection: false, allowSelfIntersectionEdit: false},
However, the editing of the page is still very difficult. After the performance analysis of Chrome, the hasSelfIntersection method in the L.PM.Edit.Line file is too long. After the analysis of the code, this is the logic to judge the self intersection. It should be called after the allowSelfIntersection parameter and allowSelfIntersectionEdit parameter. The writing method referring to the _onMarkerDragStart method is better than the _onMarkerDragEnd method, In addition, the hasSelfIntersection method is also called in its method, such as the handleLayerStyle method Please refer to the screenshot for the specific execution time. I think you should review the method call check and judgment.
My English is poor. I hope you can understand my description. Thank you.
The text was updated successfully, but these errors were encountered:
If I understand you correctly, you suggest to move the hasSelfIntersection() call into _onMarkerDragStart. We can't do this, because we need to check after moving a vertex, we need to check if there is now a intersection.
But I think we should calculate self intersection only if allowSelfIntersection is false. I will create a fix in the next days.
Thank you for your reply. Your last remark is correct. Before calling the hasSelfIntersection method, you need to check that the parameter allowSelfIntersection is true, but this is not the case in the _onMarkerDragEnd method and the handleLayerStyle method. Under multi-point conditions, it can reduce a lot of performance overhead.
I encountered the problem of a large number of dead points in page editing when using the latest leaf-geoman version. I tried to solve the problem in the demo and found that the enableGlobalEditMode method parameter passed
options: {limitMarkersToCount: 20, allowSelfIntersection: false, allowSelfIntersectionEdit: false},
However, the editing of the page is still very difficult. After the performance analysis of Chrome, the hasSelfIntersection method in the L.PM.Edit.Line file is too long. After the analysis of the code, this is the logic to judge the self intersection. It should be called after the allowSelfIntersection parameter and allowSelfIntersectionEdit parameter. The writing method referring to the _onMarkerDragStart method is better than the _onMarkerDragEnd method, In addition, the hasSelfIntersection method is also called in its method, such as the handleLayerStyle method Please refer to the screenshot for the specific execution time. I think you should review the method call check and judgment.
My English is poor. I hope you can understand my description. Thank you.
The text was updated successfully, but these errors were encountered: