1import { profiledEdges } from '../../domain/profiled-edges.js?ver=3.5.0'; 2 3export const WaterfallLayer = { 4 render(piece, options, scale) { 5 if (!piece || !options || !options.islandLegs) { 6 return ''; 7 } 8 9 // Waterfall se aplica doar pe piesa principala a insulei. 10 if (piece.id && piece.id !== 1) { 11 return ''; 12 } 13 14 const legs = options.islandLegs; 15 const w = (piece.l || 0) * scale; 16 const h = (piece.w || 0) * scale; 17 const color = '#8d6e63'; 18 // Un picior waterfall se profileazÄ doar dacÄ latura blatului de pe partea lui e 19 // bifatÄ â atunci profilul coboarÄ din blat pe picior, fÄrÄ Ã®ntrerupere (aceeaÈi 20 // regulÄ ca în price-engine, secÈiunea âIsland waterfall legs"). Desenul trebuie sÄ 21 // arate exact ce se factureazÄ, altfel clientul vede profil pe un picior pe care nu-l 22 // plÄteÈte (sau invers). `profiledEdges`, nu `piece.edges` brut: cu âFÄrÄ prelucrare" 23 // nu se profileazÄ nimic, oricâte laturi ar fi bifate. 24 const profiled = profiledEdges(piece, options); 25 const gold = '#D49400'; 26 let markup = ''; 27 28 const drawLeg = (x, y, width, height) => ` 29 <rect x="${x}" y="${y}" width="${width}" height="${height}" 30 fill="${color}" fill-opacity="0.28" stroke="${color}" stroke-width="2" stroke-dasharray="4,2" /> 31 `; 32 33 // Muchia PROFILATÄ a piciorului: cea exterioarÄ, paralelÄ cu latura din care coboarÄ 34 // profilul. AceeaÈi bordurÄ aurie cu glow ca la ProfilingLayer, ca cele douÄ sÄ se 35 // citeascÄ drept o singurÄ linie continuÄ. 36 const drawProfiledEdge = (x1, y1, x2, y2) => ` 37 <line x1="${x1}" y1="${y1}" x2="${x2}" y2="${y2}" 38 stroke="${gold}" stroke-width="6" stroke-linecap="square" class="svg-glow-gold" /> 39 `; 40 41 if (legs.left) { 42 markup += drawLeg(-15, 0, 15, h); 43 if (profiled.left) markup += drawProfiledEdge(-15, 0, -15, h); 44 } 45 if (legs.right) { 46 markup += drawLeg(w, 0, 15, h); 47 if (profiled.right) markup += drawProfiledEdge(w + 15, 0, w + 15, h); 48 } 49 if (legs.top) { 50 markup += drawLeg(0, -15, w, 15); 51 if (profiled.top) markup += drawProfiledEdge(0, -15, w, -15); 52 } 53 if (legs.bottom) { 54 markup += drawLeg(0, h, w, 15); 55 if (profiled.bottom) markup += drawProfiledEdge(0, h + 15, w, h + 15); 56 } 57 if (legs.center) { 58 // Panoul interior de susÈinere n-are cant vizibil, deci nu se profileazÄ niciodatÄ 59 // â nici în desen, nici în deviz. 60 markup += `<line x1="${w / 2}" y1="0" x2="${w / 2}" y2="${h}" stroke="${color}" stroke-width="4" stroke-dasharray="8,4" opacity="0.55" />`; 61 markup += `<text x="${(w / 2) + 6}" y="${h / 2}" fill="${color}" font-size="8" opacity="0.9">SUPORT</text>`; 62 } 63 64 return markup; 65 } 66};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.