diff --git a/web/_js/view.js b/web/_js/view.js index a3e7980e..91344f2c 100644 --- a/web/_js/view.js +++ b/web/_js/view.js @@ -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 = "";