Overdue pinouts fixes (#2824)
* fix overlap * re-add colored print list * fix print font size
This commit is contained in:
parent
c163d3bbed
commit
f322dc5ee5
|
@ -34,6 +34,7 @@ function addRow(table, pin, pdiv) {
|
||||||
var cell = cells[i];
|
var cell = cells[i];
|
||||||
cell.textContent = pin[cell.dataset.field];
|
cell.textContent = pin[cell.dataset.field];
|
||||||
}
|
}
|
||||||
|
clone.querySelector(".pin-data").dataset.type = pin.type;
|
||||||
if (pdiv) {
|
if (pdiv) {
|
||||||
row.addEventListener('click', function(table, pin, pdiv) {
|
row.addEventListener('click', function(table, pin, pdiv) {
|
||||||
clickPin(table.parentElement.parentElement.parentElement.querySelector(".info-table tbody"), pin, pdiv);
|
clickPin(table.parentElement.parentElement.parentElement.querySelector(".info-table tbody"), pin, pdiv);
|
||||||
|
@ -114,15 +115,22 @@ window.addEventListener('load', function() {
|
||||||
var newheight = (closest / mult)
|
var newheight = (closest / mult)
|
||||||
var pxheight = divheight * 0.08;
|
var pxheight = divheight * 0.08;
|
||||||
if (newheight < pxheight) {
|
if (newheight < pxheight) {
|
||||||
pxheight = newheight - 6;
|
pxheight = newheight;
|
||||||
}
|
}
|
||||||
var height = (pxheight / divheight) * 100;
|
var height = (pxheight / divheight) * 100;
|
||||||
var width = (pxheight / divwidth) * 100;
|
var width = (pxheight / divwidth) * 100;
|
||||||
pdiv.style.height = height + "%";
|
pdiv.style.height = "calc(" + height + "% - 0.21vw)";
|
||||||
pdiv.style.width = width + "%";
|
pdiv.style.width = "calc(" + width + "% - 0.21vw)";
|
||||||
pdiv.style.marginTop = "-" + (width / 2) + "%";
|
pdiv.style.marginTop = "-" + (width / 2) + "%";
|
||||||
pdiv.style.marginLeft = "-" + (width / 2) + "%";
|
pdiv.style.marginLeft = "-" + (width / 2) + "%";
|
||||||
pdiv.style.fontSize = (height * 1.8) + "px";
|
pdiv.style.fontSize = (height * 1.8) + "px";
|
||||||
|
pdiv.style.fontSize = (pxheight * 0.5) + "px";
|
||||||
|
window.addEventListener('beforeprint', function(pdiv, width, divwidth, event) {
|
||||||
|
pdiv.style.fontSize = "calc(calc(" + width + "px * min(640, " + divwidth + ")) * 0.0055)";
|
||||||
|
}.bind(null, pdiv, width, divwidth));
|
||||||
|
window.addEventListener('afterprint', function(pdiv, pxheight, event) {
|
||||||
|
pdiv.style.fontSize = (pxheight * 0.5) + "px";
|
||||||
|
}.bind(null, pdiv, pxheight));
|
||||||
cdiv.appendChild(pdiv);
|
cdiv.appendChild(pdiv);
|
||||||
addRow(fullTable, connector.pins[i], pdiv);
|
addRow(fullTable, connector.pins[i], pdiv);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue