diff --git a/js/app.js b/js/app.js index 70238ce..c6f9657 100644 --- a/js/app.js +++ b/js/app.js @@ -41,19 +41,6 @@ document.addEventListener('DOMContentLoaded', function(){ } } - function computeOrderedItems(){ - const arr = Array.from(touches.entries()).map(([id,entry])=>({id,el:entry.el,x:entry.x,y:entry.y})); - const cx = arr.reduce((s,a)=>s+a.x,0)/arr.length; - const cy = arr.reduce((s,a)=>s+a.y,0)/arr.length; - arr.forEach(a=>{ - const ang = Math.atan2(a.y-cy,a.x-cx) * 180/Math.PI; - a.angle = (ang+360)%360; - a.dist = Math.hypot(a.x-cx,a.y-cy); - }); - arr.sort((a,b)=>a.angle-b.angle); - return {items:arr, center:{x:cx,y:cy}}; - } - function computeOrderedItems(){ const arr = Array.from(touches.entries()).map(([id,entry])=>({id,el:entry.el,x:entry.x,y:entry.y})); const cx = arr.reduce((s,a)=>s+a.x,0)/arr.length; @@ -172,5 +159,3 @@ document.addEventListener('DOMContentLoaded', function(){ window.addEventListener('mouseup', function(e){ if(!mouseDown) return; mouseDown=false; removeFingerById(mouseId); if(!selectionDone) cancelSelection(); if(touches.size===0) resetWhenAllUp(); }); }); - -});