← Commit history
viewers/symbol.html+3−2@@ -23,7 +23,7 @@ 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='-750 -300 1500 600' style='width:100%;height:100%'><rect x='-500.0' y='-250.0' width='1000.0' height='500.0' fill='#e35d5d22' stroke='#e35d5d' stroke-width='4'/><g class='pingroup' data-num='1' data-name='Output 1'><line class='pinvis' x1='-700.0' y1='-150.0' x2='-500.0' y2='-150.0' stroke='#dfe4ec' stroke-width='4'/><line x1='-700.0' y1='-150.0' x2='-500.0' y2='-150.0' stroke='transparent' stroke-width='26' pointer-events='stroke'/></g><text x='-600.0' y='-105.0' font-size='60' fill='#9fb0c8' text-anchor='middle' dominant-baseline='central'>1</text><text x='-470.0' y='-150.0' font-size='60' fill='#e6e9ef' text-anchor='start' dominant-baseline='central'>Output 1</text><g class='pingroup' data-num='2' data-name='Inverting Input 1'><line class='pinvis' x1='-700.0' y1='-50.0' x2='-500.0' y2='-50.0' stroke='#dfe4ec' stroke-width='4'/><line x1='-700.0' y1='-50.0' x2='-500.0' y2='-50.0' stroke='transparent' stroke-width='26' pointer-events='stroke'/></g><text x='-600.0' y='-5.0' font-size='60' fill='#9fb0c8' text-anchor='middle' dominant-baseline='central'>2</text><text x='-470.0' y='-50.0' font-size='60' fill='#e6e9ef' text-anchor='start' dominant-baseline='central'>Inverting Input 1</text><g class='pingroup' data-num='3' data-name='Non-inverting Input 1'><line class='pinvis' x1='-700.0' y1='50.0' x2='-500.0' y2='50.0' stroke='#dfe4ec' stroke-width='4'/><line x1='-700.0' y1='50.0' x2='-500.0' y2='50.0' stroke='transparent' stroke-width='26' pointer-events='stroke'/></g><text x='-600.0' y='95.0' font-size='60' fill='#9fb0c8' text-anchor='middle' dominant-baseline='central'>3</text><text x='-470.0' y='50.0' font-size='60' fill='#e6e9ef' text-anchor='start' dominant-baseline='central'>Non-inverting Input 1</text><g class='pingroup' data-num='4' data-name='VCC-'><line class='pinvis' x1='-700.0' y1='150.0' x2='-500.0' y2='150.0' stroke='#dfe4ec' stroke-width='4'/><line x1='-700.0' y1='150.0' x2='-500.0' y2='150.0' stroke='transparent' stroke-width='26' pointer-events='stroke'/></g><text x='-600.0' y='195.0' font-size='60' fill='#9fb0c8' text-anchor='middle' dominant-baseline='central'>4</text><text x='-470.0' y='150.0' font-size='60' fill='#e6e9ef' text-anchor='start' dominant-baseline='central'>VCC-</text><g class='pingroup' data-num='8' data-name='VCC+'><line class='pinvis' x1='700.0' y1='-150.0' x2='500.0' y2='-150.0' stroke='#dfe4ec' stroke-width='4'/><line x1='700.0' y1='-150.0' x2='500.0' y2='-150.0' stroke='transparent' stroke-width='26' pointer-events='stroke'/></g><text x='600.0' y='-195.0' font-size='60' fill='#9fb0c8' text-anchor='middle' dominant-baseline='central'>8</text><text x='470.0' y='-150.0' font-size='60' fill='#e6e9ef' text-anchor='end' dominant-baseline='central'>VCC+</text><g class='pingroup' data-num='7' data-name='Output 2'><line class='pinvis' x1='700.0' y1='-50.0' x2='500.0' y2='-50.0' stroke='#dfe4ec' stroke-width='4'/><line x1='700.0' y1='-50.0' x2='500.0' y2='-50.0' stroke='transparent' stroke-width='26' pointer-events='stroke'/></g><text x='600.0' y='-95.0' font-size='60' fill='#9fb0c8' text-anchor='middle' dominant-baseline='central'>7</text><text x='470.0' y='-50.0' font-size='60' fill='#e6e9ef' text-anchor='end' dominant-baseline='central'>Output 2</text><g class='pingroup' data-num='6' data-name='Inverting Input 2'><line class='pinvis' x1='700.0' y1='50.0' x2='500.0' y2='50.0' stroke='#dfe4ec' stroke-width='4'/><line x1='700.0' y1='50.0' x2='500.0' y2='50.0' stroke='transparent' stroke-width='26' pointer-events='stroke'/></g><text x='600.0' y='5.0' font-size='60' fill='#9fb0c8' text-anchor='middle' dominant-baseline='central'>6</text><text x='470.0' y='50.0' font-size='60' fill='#e6e9ef' text-anchor='end' dominant-baseline='central'>Inverting Input 2</text><g class='pingroup' data-num='5' data-name='Non-inverting Input 2'><line class='pinvis' x1='700.0' y1='150.0' x2='500.0' y2='150.0' stroke='#dfe4ec' stroke-width='4'/><line x1='700.0' y1='150.0' x2='500.0' y2='150.0' stroke='transparent' stroke-width='26' pointer-events='stroke'/></g><text x='600.0' y='105.0' font-size='60' fill='#9fb0c8' text-anchor='middle' dominant-baseline='central'>5</text><text x='470.0' y='150.0' font-size='60' fill='#e6e9ef' text-anchor='end' dominant-baseline='central'>Non-inverting Input 2</text></svg></div>+<div class=stage id=stage><svg xmlns='http://www.w3.org/2000/svg' viewBox='-1050 -300 2100 600' style='width:100%;height:100%'><rect x='-800.0' y='-250.0' width='1600.0' height='500.0' fill='#e35d5d22' stroke='#e35d5d' stroke-width='4'/><g class='pingroup' data-num='1' data-name='Output 1'><line class='pinvis' x1='-1000.0' y1='-150.0' x2='-800.0' y2='-150.0' stroke='#dfe4ec' stroke-width='4'/><line x1='-1000.0' y1='-150.0' x2='-800.0' y2='-150.0' stroke='transparent' stroke-width='26' pointer-events='stroke'/></g><text x='-900.0' y='-105.0' font-size='60' fill='#9fb0c8' text-anchor='middle' dominant-baseline='central'>1</text><text x='-770.0' y='-150.0' font-size='60' fill='#e6e9ef' text-anchor='start' dominant-baseline='central'>Output 1</text><g class='pingroup' data-num='2' data-name='Inverting Input 1'><line class='pinvis' x1='-1000.0' y1='-50.0' x2='-800.0' y2='-50.0' stroke='#dfe4ec' stroke-width='4'/><line x1='-1000.0' y1='-50.0' x2='-800.0' y2='-50.0' stroke='transparent' stroke-width='26' pointer-events='stroke'/></g><text x='-900.0' y='-5.0' font-size='60' fill='#9fb0c8' text-anchor='middle' dominant-baseline='central'>2</text><text x='-770.0' y='-50.0' font-size='60' fill='#e6e9ef' text-anchor='start' dominant-baseline='central'>Inverting Input 1</text><g class='pingroup' data-num='3' data-name='Non-inverting Input 1'><line class='pinvis' x1='-1000.0' y1='50.0' x2='-800.0' y2='50.0' stroke='#dfe4ec' stroke-width='4'/><line x1='-1000.0' y1='50.0' x2='-800.0' y2='50.0' stroke='transparent' stroke-width='26' pointer-events='stroke'/></g><text x='-900.0' y='95.0' font-size='60' fill='#9fb0c8' text-anchor='middle' dominant-baseline='central'>3</text><text x='-770.0' y='50.0' font-size='60' fill='#e6e9ef' text-anchor='start' dominant-baseline='central'>Non-inverting Input 1</text><g class='pingroup' data-num='4' data-name='VCC-'><line class='pinvis' x1='-1000.0' y1='150.0' x2='-800.0' y2='150.0' stroke='#dfe4ec' stroke-width='4'/><line x1='-1000.0' y1='150.0' x2='-800.0' y2='150.0' stroke='transparent' stroke-width='26' pointer-events='stroke'/></g><text x='-900.0' y='195.0' font-size='60' fill='#9fb0c8' text-anchor='middle' dominant-baseline='central'>4</text><text x='-770.0' y='150.0' font-size='60' fill='#e6e9ef' text-anchor='start' dominant-baseline='central'>VCC-</text><g class='pingroup' data-num='8' data-name='VCC+'><line class='pinvis' x1='1000.0' y1='-150.0' x2='800.0' y2='-150.0' stroke='#dfe4ec' stroke-width='4'/><line x1='1000.0' y1='-150.0' x2='800.0' y2='-150.0' stroke='transparent' stroke-width='26' pointer-events='stroke'/></g><text x='900.0' y='-195.0' font-size='60' fill='#9fb0c8' text-anchor='middle' dominant-baseline='central'>8</text><text x='770.0' y='-150.0' font-size='60' fill='#e6e9ef' text-anchor='end' dominant-baseline='central'>VCC+</text><g class='pingroup' data-num='7' data-name='Output 2'><line class='pinvis' x1='1000.0' y1='-50.0' x2='800.0' y2='-50.0' stroke='#dfe4ec' stroke-width='4'/><line x1='1000.0' y1='-50.0' x2='800.0' y2='-50.0' stroke='transparent' stroke-width='26' pointer-events='stroke'/></g><text x='900.0' y='-95.0' font-size='60' fill='#9fb0c8' text-anchor='middle' dominant-baseline='central'>7</text><text x='770.0' y='-50.0' font-size='60' fill='#e6e9ef' text-anchor='end' dominant-baseline='central'>Output 2</text><g class='pingroup' data-num='6' data-name='Inverting Input 2'><line class='pinvis' x1='1000.0' y1='50.0' x2='800.0' y2='50.0' stroke='#dfe4ec' stroke-width='4'/><line x1='1000.0' y1='50.0' x2='800.0' y2='50.0' stroke='transparent' stroke-width='26' pointer-events='stroke'/></g><text x='900.0' y='5.0' font-size='60' fill='#9fb0c8' text-anchor='middle' dominant-baseline='central'>6</text><text x='770.0' y='50.0' font-size='60' fill='#e6e9ef' text-anchor='end' dominant-baseline='central'>Inverting Input 2</text><g class='pingroup' data-num='5' data-name='Non-inverting Input 2'><line class='pinvis' x1='1000.0' y1='150.0' x2='800.0' y2='150.0' stroke='#dfe4ec' stroke-width='4'/><line x1='1000.0' y1='150.0' x2='800.0' y2='150.0' stroke='transparent' stroke-width='26' pointer-events='stroke'/></g><text x='900.0' y='105.0' font-size='60' fill='#9fb0c8' text-anchor='middle' dominant-baseline='central'>5</text><text x='770.0' y='150.0' font-size='60' fill='#e6e9ef' text-anchor='end' dominant-baseline='central'>Non-inverting Input 2</text></svg></div> <div id=tip></div> <script> var KIND="symbol", MPN="ADOM/TS27L2AIDT", PINS=[{"desc":"","name":"Output 1","number":"1","type":""},{"desc":"","name":"Inverting Input 1","number":"2","type":""},{"desc":"","name":"Non-inverting Input 1","number":"3","type":""},{"desc":"","name":"VCC-","number":"4","type":""},{"desc":"","name":"VCC+","number":"8","type":""},{"desc":"","name":"Output 2","number":"7","type":""},{"desc":"","name":"Inverting Input 2","number":"6","type":""},{"desc":"","name":"Non-inverting Input 2","number":"5","type":""}];@@ -44,7 +44,8 @@ function els(n){return [].slice.call(document.querySelectorAll('[data-num="'+n+' function clearHi(){[].slice.call(document.querySelectorAll('.hi')).forEach(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(_){}}-function showTip(n,x,y){var p=byNum[String(n)];if(!p)return;tip.innerHTML='<span class=tn></span><div class=tt></div><div class=td></div>';tip.querySelector('.tn').textContent=n+' '+(p.name||'');tip.querySelector('.tt').textContent=p.type||'';var d=p.desc||'';if(d)tip.querySelector('.td').textContent=d;else tip.querySelector('.td').style.display='none';tip.style.display='block';tip.style.left=(x+14)+'px';tip.style.top=(y+12)+'px';}+function ovName(el,pre,nm){el.textContent=pre;var r=nm,i;while((i=r.indexOf('~{'))>=0){el.appendChild(document.createTextNode(r.slice(0,i)));var a=r.slice(i+2),j=a.indexOf('}'),s=document.createElement('span');s.style.textDecoration='overline';s.textContent=j<0?a:a.slice(0,j);el.appendChild(s);r=j<0?'':a.slice(j+1);}el.appendChild(document.createTextNode(r));}+function showTip(n,x,y){var p=byNum[String(n)];if(!p)return;tip.innerHTML='<span class=tn></span><div class=tt></div><div class=td></div>';ovName(tip.querySelector('.tn'),n+' ',p.name||'');tip.querySelector('.tt').textContent=p.type||'';var d=p.desc||'';if(d)tip.querySelector('.td').textContent=d;else tip.querySelector('.td').style.display='none';tip.style.display='block';tip.style.left=(x+14)+'px';tip.style.top=(y+12)+'px';} [].slice.call(document.querySelectorAll('.pingroup,.pad')).forEach(function(g){ var n=g.getAttribute('data-num'); g.addEventListener('mouseenter',function(e){clearHi();hi(n);post(n);showTip(n,e.clientX,e.clientY);});