← Commit history

5551-g1: viewers

Ray ·f01fdee149 · ·parent 1ab4a29
2 files changed +5−5
viewers/footprint.html+3−3
@@ -51,13 +51,13 @@ aside .ah{padding:9px 12px;border-bottom:1px solid var(--border);font-size:12px; .layers{padding:6px} .note{font-size:11px;color:var(--muted);line-height:1.45;padding:8px 11px} .note b{color:#7ef0d2}-</style></head>+</style><style>/* lbr-hover bus (component-factory inject_layers) */[data-num]{cursor:pointer}[data-num].hi>*{fill:#ffd166!important;stroke:#ffffff!important;stroke-width:0.08!important}</style></head> <body>   <header><span class="dot"></span><span class="b">adom-footprint <span>· interactive</span></span><span class="nm">SOT-23</span></header>   <main>     <div class="vpwrap">       <div class="av-vp" id="vp">-        <svg xmlns="http://www.w3.org/2000/svg" viewBox="-2.825 -2.400 5.650 4.800" preserveAspectRatio="xMidYMid meet"><g class="adom-layer-courtyard"><polygon points="-1.9300,-1.5000 -0.9000,-1.5000 -0.9000,-1.7000 0.9000,-1.7000 0.9000,-0.5500 1.9300,-0.5500 1.9300,0.5500 0.9000,0.5500 0.9000,1.7000 -0.9000,1.7000 -0.9000,1.5000 -1.9300,1.5000" stroke="#FF26E2" stroke-width="0.050" fill="none"/></g><g class="adom-layer-fab"><polygon points="-0.3250,-1.4500 0.6500,-1.4500 0.6500,1.4500 -0.6500,1.4500 -0.6500,-1.1250" stroke="#6e7681" stroke-width="0.100" fill="none"/></g><g class="adom-layer-copper"><g data-pad="1" data-shape="roundrect" data-size="1.475x0.600" data-mount="smd"><rect x="-1.675" y="-1.250" width="1.475" height="0.600" rx="0.150" fill="#C83434" stroke="#ef5350" stroke-width="0.04"/></g><g data-pad="2" data-shape="roundrect" data-size="1.475x0.600" data-mount="smd"><rect x="-1.675" y="0.650" width="1.475" height="0.600" rx="0.150" fill="#C83434" stroke="#ef5350" stroke-width="0.04"/></g><g data-pad="3" data-shape="roundrect" data-size="1.475x0.600" data-mount="smd"><rect x="0.200" y="-0.300" width="1.475" height="0.600" rx="0.150" fill="#C83434" stroke="#ef5350" stroke-width="0.04"/></g></g><g class="adom-layer-heatsink"></g><g class="adom-layer-drill"></g><g class="adom-layer-silk"><line x1="-0.7600" y1="-1.5600" x2="0.7600" y2="-1.5600" stroke="#00cccc" stroke-width="0.120" stroke-linecap="round" fill="none"/><line x1="-0.7600" y1="-1.5100" x2="-0.7600" y2="-1.5600" stroke="#00cccc" stroke-width="0.120" stroke-linecap="round" fill="none"/><line x1="-0.7600" y1="0.3900" x2="-0.7600" y2="-0.3900" stroke="#00cccc" stroke-width="0.120" stroke-linecap="round" fill="none"/><line x1="-0.7600" y1="1.5600" x2="-0.7600" y2="1.5100" stroke="#00cccc" stroke-width="0.120" stroke-linecap="round" fill="none"/><line x1="0.7600" y1="-1.5600" x2="0.7600" y2="-0.5600" stroke="#00cccc" stroke-width="0.120" stroke-linecap="round" fill="none"/><line x1="0.7600" y1="0.5600" x2="0.7600" y2="1.5600" stroke="#00cccc" stroke-width="0.120" stroke-linecap="round" fill="none"/><line x1="0.7600" y1="1.5600" x2="-0.7600" y2="1.5600" stroke="#00cccc" stroke-width="0.120" stroke-linecap="round" fill="none"/><polygon points="-1.3000,-0.3800 -1.0600,-0.0500 -1.5400,-0.0500" stroke="#00cccc" stroke-width="0.120" fill="#00cccc"/></g><g class="adom-layer-padnum"><text x="-0.938" y="-0.950" text-anchor="middle" dominant-baseline="central" font-size="0.252" fill="#fff" font-family="sans-serif" style="pointer-events:none">1</text><text x="-0.938" y="0.950" text-anchor="middle" dominant-baseline="central" font-size="0.252" fill="#fff" font-family="sans-serif" style="pointer-events:none">2</text><text x="0.938" y="0.000" text-anchor="middle" dominant-baseline="central" font-size="0.252" fill="#fff" font-family="sans-serif" style="pointer-events:none">3</text></g><g class="adom-layer-paste-apertures"><rect x="-1.675" y="-1.250" width="1.475" height="0.600" rx="0.05" transform="rotate(0.00 -0.938 -0.950)" fill="none" stroke="#8aa0b8" stroke-width="0.03" stroke-dasharray="0.12 0.08" opacity="0.7"/><rect x="-1.675" y="0.650" width="1.475" height="0.600" rx="0.05" transform="rotate(0.00 -0.938 0.950)" fill="none" stroke="#8aa0b8" stroke-width="0.03" stroke-dasharray="0.12 0.08" opacity="0.7"/><rect x="0.200" y="-0.300" width="1.475" height="0.600" rx="0.05" transform="rotate(0.00 0.938 0.000)" fill="none" stroke="#8aa0b8" stroke-width="0.03" stroke-dasharray="0.12 0.08" opacity="0.7"/></g><g class="adom-layer-paste-dots"><circle cx="-1.438" cy="-0.950" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="-1.188" cy="-0.950" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="-0.938" cy="-0.950" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="-0.688" cy="-0.950" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="-0.438" cy="-0.950" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="-1.438" cy="0.950" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="-1.188" cy="0.950" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="-0.938" cy="0.950" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="-0.688" cy="0.950" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="-0.438" cy="0.950" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="0.438" cy="0.000" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="0.688" cy="0.000" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="0.938" cy="0.000" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="1.188" cy="0.000" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="1.438" cy="0.000" r="0.150" fill="#37c8a6" opacity="0.92"/></g></svg>+        <svg xmlns="http://www.w3.org/2000/svg" viewBox="-2.825 -2.400 5.650 4.800" preserveAspectRatio="xMidYMid meet"><g class="adom-layer-courtyard"><polygon points="-1.9300,-1.5000 -0.9000,-1.5000 -0.9000,-1.7000 0.9000,-1.7000 0.9000,-0.5500 1.9300,-0.5500 1.9300,0.5500 0.9000,0.5500 0.9000,1.7000 -0.9000,1.7000 -0.9000,1.5000 -1.9300,1.5000" stroke="#FF26E2" stroke-width="0.050" fill="none"/></g><g class="adom-layer-fab"><polygon points="-0.3250,-1.4500 0.6500,-1.4500 0.6500,1.4500 -0.6500,1.4500 -0.6500,-1.1250" stroke="#6e7681" stroke-width="0.100" fill="none"/></g><g class="adom-layer-copper"><g data-pad="1" data-num="1" data-shape="roundrect" data-size="1.475x0.600" data-mount="smd"><rect x="-1.675" y="-1.250" width="1.475" height="0.600" rx="0.150" fill="#C83434" stroke="#ef5350" stroke-width="0.04"/></g><g data-pad="2" data-num="2" data-shape="roundrect" data-size="1.475x0.600" data-mount="smd"><rect x="-1.675" y="0.650" width="1.475" height="0.600" rx="0.150" fill="#C83434" stroke="#ef5350" stroke-width="0.04"/></g><g data-pad="3" data-num="3" data-shape="roundrect" data-size="1.475x0.600" data-mount="smd"><rect x="0.200" y="-0.300" width="1.475" height="0.600" rx="0.150" fill="#C83434" stroke="#ef5350" stroke-width="0.04"/></g></g><g class="adom-layer-heatsink"></g><g class="adom-layer-drill"></g><g class="adom-layer-silk"><line x1="-0.7600" y1="-1.5600" x2="0.7600" y2="-1.5600" stroke="#00cccc" stroke-width="0.120" stroke-linecap="round" fill="none"/><line x1="-0.7600" y1="-1.5100" x2="-0.7600" y2="-1.5600" stroke="#00cccc" stroke-width="0.120" stroke-linecap="round" fill="none"/><line x1="-0.7600" y1="0.3900" x2="-0.7600" y2="-0.3900" stroke="#00cccc" stroke-width="0.120" stroke-linecap="round" fill="none"/><line x1="-0.7600" y1="1.5600" x2="-0.7600" y2="1.5100" stroke="#00cccc" stroke-width="0.120" stroke-linecap="round" fill="none"/><line x1="0.7600" y1="-1.5600" x2="0.7600" y2="-0.5600" stroke="#00cccc" stroke-width="0.120" stroke-linecap="round" fill="none"/><line x1="0.7600" y1="0.5600" x2="0.7600" y2="1.5600" stroke="#00cccc" stroke-width="0.120" stroke-linecap="round" fill="none"/><line x1="0.7600" y1="1.5600" x2="-0.7600" y2="1.5600" stroke="#00cccc" stroke-width="0.120" stroke-linecap="round" fill="none"/><polygon points="-1.3000,-0.3800 -1.0600,-0.0500 -1.5400,-0.0500" stroke="#00cccc" stroke-width="0.120" fill="#00cccc"/></g><g class="adom-layer-padnum"><text x="-0.938" y="-0.950" text-anchor="middle" dominant-baseline="central" font-size="0.252" fill="#fff" font-family="sans-serif" style="pointer-events:none">1</text><text x="-0.938" y="0.950" text-anchor="middle" dominant-baseline="central" font-size="0.252" fill="#fff" font-family="sans-serif" style="pointer-events:none">2</text><text x="0.938" y="0.000" text-anchor="middle" dominant-baseline="central" font-size="0.252" fill="#fff" font-family="sans-serif" style="pointer-events:none">3</text></g><g class="adom-layer-paste-apertures"><rect x="-1.675" y="-1.250" width="1.475" height="0.600" rx="0.05" transform="rotate(0.00 -0.938 -0.950)" fill="none" stroke="#8aa0b8" stroke-width="0.03" stroke-dasharray="0.12 0.08" opacity="0.7"/><rect x="-1.675" y="0.650" width="1.475" height="0.600" rx="0.05" transform="rotate(0.00 -0.938 0.950)" fill="none" stroke="#8aa0b8" stroke-width="0.03" stroke-dasharray="0.12 0.08" opacity="0.7"/><rect x="0.200" y="-0.300" width="1.475" height="0.600" rx="0.05" transform="rotate(0.00 0.938 0.000)" fill="none" stroke="#8aa0b8" stroke-width="0.03" stroke-dasharray="0.12 0.08" opacity="0.7"/></g><g class="adom-layer-paste-dots"><circle cx="-1.438" cy="-0.950" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="-1.188" cy="-0.950" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="-0.938" cy="-0.950" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="-0.688" cy="-0.950" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="-0.438" cy="-0.950" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="-1.438" cy="0.950" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="-1.188" cy="0.950" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="-0.938" cy="0.950" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="-0.688" cy="0.950" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="-0.438" cy="0.950" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="0.438" cy="0.000" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="0.688" cy="0.000" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="0.938" cy="0.000" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="1.188" cy="0.000" r="0.150" fill="#37c8a6" opacity="0.92"/><circle cx="1.438" cy="0.000" r="0.150" fill="#37c8a6" opacity="0.92"/></g></svg>       </div>     </div>     <aside>@@ -207,4 +207,4 @@ var META={"pasteApertures":3,"pasteDots":15};   AV.buildLayers({ svg:svg, container:document.getElementById('layers'), state:{}, meta:META }); })(); </script>-</body></html>+<script>/* lbr-hover bus (component-factory inject_layers) */(function(){var MPN=null;function els(n){return [].slice.call(document.querySelectorAll('[data-num="'+n+'"]'));}function clearHi(){[].forEach.call(document.querySelectorAll('[data-num].hi'),function(e){e.classList.remove('hi');});}function hi(n){els(n).forEach(function(e){e.classList.add('hi');});}function post(n){try{parent.postMessage({type:'lbr-hover',pin:n===null?null:String(n),mpn:MPN},'*');}catch(_){}}[].forEach.call(document.querySelectorAll('[data-num]'),function(g){var n=g.getAttribute('data-num');g.addEventListener('mouseenter',function(){clearHi();hi(n);post(n);});g.addEventListener('mouseleave',function(){clearHi();post(null);});});window.addEventListener('message',function(e){var d=e.data||{};if(d.type!=='lbr-hover')return;clearHi();if(d.pin!=null)hi(d.pin);});})();</script></body></html>
viewers/symbol.html+2−2
@@ -23,10 +23,10 @@ rect.pad.hi{stroke:var(--hi);stroke-width:.15;paint-order:stroke} #tip .td{font-size:11px;color:var(--ink);margin-top:5px;line-height:1.4} </style></head><body> <div class=bar><span class=h>Schematic symbol</span><span class=sp></span></div>-<div class=stage id=stage><svg xmlns='http://www.w3.org/2000/svg' viewBox='-250 -250 461 500' style='width:100%;height:100%'><polyline points='-100.0,-0.0 25.0,-0.0' fill='none' stroke='#e35d5d' stroke-width='4'/><polyline points='25.0,-75.0 25.0,75.0' fill='none' stroke='#e35d5d' stroke-width='4'/><polyline points='25.0,-25.0 100.0,-100.0' fill='none' stroke='#e35d5d' stroke-width='4'/><polyline points='25.0,25.0 100.0,100.0' fill='none' stroke='#e35d5d' stroke-width='4'/><polyline points='50.0,70.0 70.0,50.0 90.0,90.0 50.0,70.0' fill='none' stroke='#e35d5d' stroke-width='4'/><circle cx='50.0' cy='-0.0' r='111.0' fill='none' stroke='#e35d5d' stroke-width='4'/><g class='pingroup' data-num='1' data-name='B'><line class='pinvis' x1='-200.0' y1='-0.0' x2='-100.0' y2='-0.0' stroke='#dfe4ec' stroke-width='4'/><line x1='-200.0' y1='-0.0' x2='-100.0' y2='-0.0' stroke='transparent' stroke-width='26' pointer-events='stroke'/></g><text x='-150.0' y='37.5' font-size='50' fill='#9fb0c8' text-anchor='middle' dominant-baseline='central'>1</text><g class='pingroup' data-num='3' data-name='C'><line class='pinvis' x1='100.0' y1='-200.0' x2='100.0' y2='-100.0' stroke='#dfe4ec' stroke-width='4'/><line x1='100.0' y1='-200.0' x2='100.0' y2='-100.0' stroke='transparent' stroke-width='26' pointer-events='stroke'/></g><text x='62.5' y='-150.0' font-size='50' fill='#9fb0c8' text-anchor='middle' dominant-baseline='central'>3</text><g class='pingroup' data-num='2' data-name='E'><line class='pinvis' x1='100.0' y1='200.0' x2='100.0' y2='100.0' stroke='#dfe4ec' stroke-width='4'/><line x1='100.0' y1='200.0' x2='100.0' y2='100.0' stroke='transparent' stroke-width='26' pointer-events='stroke'/></g><text x='137.5' y='150.0' font-size='50' fill='#9fb0c8' text-anchor='middle' dominant-baseline='central'>2</text></svg></div>+<div class=stage id=stage><svg xmlns='http://www.w3.org/2000/svg' viewBox='-250 -250 461 500' style='width:100%;height:100%'><polyline points='-100.0,-0.0 25.0,-0.0' fill='none' stroke='#e35d5d' stroke-width='4'/><polyline points='25.0,-75.0 25.0,75.0' fill='none' stroke='#e35d5d' stroke-width='4'/><polyline points='25.0,-25.0 100.0,-100.0' fill='none' stroke='#e35d5d' stroke-width='4'/><polyline points='25.0,25.0 100.0,100.0' fill='none' stroke='#e35d5d' stroke-width='4'/><polyline points='50.0,70.0 70.0,50.0 90.0,90.0 50.0,70.0' fill='none' stroke='#e35d5d' stroke-width='4'/><circle cx='50.0' cy='-0.0' r='111.0' fill='none' stroke='#e35d5d' stroke-width='4'/><g class='pingroup' data-num='1' data-name='Base'><line class='pinvis' x1='-200.0' y1='-0.0' x2='-100.0' y2='-0.0' stroke='#dfe4ec' stroke-width='4'/><line x1='-200.0' y1='-0.0' x2='-100.0' y2='-0.0' stroke='transparent' stroke-width='26' pointer-events='stroke'/></g><text x='-150.0' y='37.5' font-size='50' fill='#9fb0c8' text-anchor='middle' dominant-baseline='central'>1</text><g class='pingroup' data-num='3' data-name='Collector'><line class='pinvis' x1='100.0' y1='-200.0' x2='100.0' y2='-100.0' stroke='#dfe4ec' stroke-width='4'/><line x1='100.0' y1='-200.0' x2='100.0' y2='-100.0' stroke='transparent' stroke-width='26' pointer-events='stroke'/></g><text x='62.5' y='-150.0' font-size='50' fill='#9fb0c8' text-anchor='middle' dominant-baseline='central'>3</text><g class='pingroup' data-num='2' data-name='Emitter'><line class='pinvis' x1='100.0' y1='200.0' x2='100.0' y2='100.0' stroke='#dfe4ec' stroke-width='4'/><line x1='100.0' y1='200.0' x2='100.0' y2='100.0' stroke='transparent' stroke-width='26' pointer-events='stroke'/></g><text x='137.5' y='150.0' font-size='50' fill='#9fb0c8' text-anchor='middle' dominant-baseline='central'>2</text></svg></div> <div id=tip></div> <script>-var KIND="symbol", MPN="ADOM/5551-G1", PINS=[{"desc":"","name":"B","number":"1","type":""},{"desc":"","name":"C","number":"3","type":""},{"desc":"","name":"E","number":"2","type":""}];+var KIND="symbol", MPN="ADOM/5551-G1", PINS=[{"desc":"","name":"Base","number":"1","type":""},{"desc":"","name":"Collector","number":"3","type":""},{"desc":"","name":"Emitter","number":"2","type":""}]; var byNum={}; PINS.forEach(function(p){byNum[String(p.number)]=p;}); var stage=document.getElementById('stage'), svg=stage.querySelector('svg'), tip=document.getElementById('tip'); // ---- pan/zoom ----