maker: anteprima DXF disegnata con path e viewBox camel (Refs #101)
Un solo <path :d="dxfPreviewD()"> al posto di template x-for + polyline (x-for non funziona nel namespace SVG) e x-bind:view-box.camel al posto di :viewBox (il parser HTML abbassa il nome dell'attributo). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -718,14 +718,13 @@
|
||||
<p x-show="dxfPreviewBusy" class="mt-1 text-xs text-[var(--text-muted)]">{{ _('Lettura DXF…') }}</p>
|
||||
<p x-show="dxfPreviewError" class="mt-1 text-xs text-red-500" x-text="dxfPreviewError"></p>
|
||||
<div x-show="dxfPreview" class="mt-2">
|
||||
<svg :viewBox="dxfPreviewViewBox()" preserveAspectRatio="xMidYMid meet"
|
||||
<svg x-bind:view-box.camel="dxfPreviewViewBox()" preserveAspectRatio="xMidYMid meet"
|
||||
class="block w-full rounded border border-[var(--border-color)]"
|
||||
style="max-height: 240px; background: var(--bg-primary);">
|
||||
<template x-for="(pts, i) in dxfPreviewPaths()" :key="i">
|
||||
<polyline :points="pts" fill="none" stroke="var(--color-primary, #2563eb)"
|
||||
stroke-width="1.5" vector-effect="non-scaling-stroke"
|
||||
stroke-linejoin="round"></polyline>
|
||||
</template>
|
||||
<!-- #101: un solo path (x-for/template non funziona nel namespace SVG); view-box.camel perche' il parser HTML abbassa viewBox -->
|
||||
<path :d="dxfPreviewD()" fill="none" stroke="var(--color-primary, #2563eb)"
|
||||
stroke-width="1.5" vector-effect="non-scaling-stroke"
|
||||
stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
<p class="mt-1 text-xs text-[var(--text-muted)]" x-text="dxfPreviewSummary"></p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user