Merge pull request #1046 from Wayland-Smithy/small-feature-prio

Make ObjectsList order small areas before overlapping larger ones on hover
This commit is contained in:
Alex Tsernoh 2022-04-07 22:25:55 +01:00 committed by GitHub
commit 0038245876
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -345,7 +345,9 @@ function initView(){
}
if(changed){
hovered = newHovered;
hovered = newHovered.sort(function(a, b){
return calcPolygonArea(a.path) - calcPolygonArea(b.path);
});
objectsContainer.innerHTML = "";