Improve drawing symbols and sample popup

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
CopilotandCopilot committed 2026-11-05 17:30:24 +09:00
1 parent 7efe9097ce
commit a0ec74b09b
11 files changed
+108 -21

No files matched your search

+1 -1
View File
@@ -32,7 +32,7 @@ function dimensionLanes(view:DrawingView):void{
dims.sort((a,b)=>a.value-b.value);
for(const e of dims){
const a=e.axis==='x'?e.a[0]/s:shortenedY(e.a[1],view.breaks)/s,c=e.axis==='x'?e.b[0]/s:shortenedY(e.b[1],view.breaks)/s;
const lo=Math.min(a,c),hi=Math.max(a,c),width=textWidth(e.value.toLocaleString('en-US',{maximumFractionDigits:1}),CAD_STYLE.dimensionText),mid=(lo+hi)/2;
const lo=Math.min(a,c),hi=Math.max(a,c),width=textWidth(e.label??e.value.toLocaleString('en-US',{maximumFractionDigits:1}),CAD_STYLE.dimensionText),mid=(lo+hi)/2;
const item={lo,hi,textLo:mid-width/2-.6,textHi:mid+width/2+.6};
let lane=0;
while(lanes[lane]?.some(p=>Math.min(p.hi,item.hi)-Math.max(p.lo,item.lo)>.05||Math.min(p.textHi,item.textHi)-Math.max(p.textLo,item.textLo)>0))lane++;