parent
dd14cb277a
commit
f2fdea33fb
|
@ -17,10 +17,12 @@ function addRow(table, pin, pdiv) {
|
||||||
tdata.textContent = pin.type
|
tdata.textContent = pin.type
|
||||||
fdata.textContent = pin.function;
|
fdata.textContent = pin.function;
|
||||||
cdata.textContent = pin.color
|
cdata.textContent = pin.color
|
||||||
|
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);
|
||||||
table.parentElement.parentElement.parentElement.scrollIntoView()
|
table.parentElement.parentElement.parentElement.scrollIntoView()
|
||||||
}.bind(null, table, pin, pdiv));
|
}.bind(null, table, pin, pdiv));
|
||||||
|
}
|
||||||
table.appendChild(clone);
|
table.appendChild(clone);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,8 +69,10 @@ window.addEventListener('load', function() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
addRow(fullTable, connector.pins[i], pdiv);
|
if (!pinfo.x) {
|
||||||
if (!pinfo.x) continue;
|
addRow(fullTable, connector.pins[i], null);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
var closest = 1000000;
|
var closest = 1000000;
|
||||||
for (var ii = 0; ii < connector.info.pins.length; ii++) {
|
for (var ii = 0; ii < connector.info.pins.length; ii++) {
|
||||||
var tinfo = connector.info.pins[ii];
|
var tinfo = connector.info.pins[ii];
|
||||||
|
@ -101,8 +105,9 @@ window.addEventListener('load', function() {
|
||||||
pdiv.style.width = width + "%";
|
pdiv.style.width = width + "%";
|
||||||
pdiv.style.marginTop = "-" + (width / 2) + "%";
|
pdiv.style.marginTop = "-" + (width / 2) + "%";
|
||||||
pdiv.style.marginLeft = "-" + (width / 2) + "%";
|
pdiv.style.marginLeft = "-" + (width / 2) + "%";
|
||||||
pdiv.style.fontSize = (height / 7.5) + "vw";
|
pdiv.style.fontSize = (height * 1.8) + "px";
|
||||||
cdiv.appendChild(pdiv);
|
cdiv.appendChild(pdiv);
|
||||||
|
addRow(fullTable, connector.pins[i], pdiv);
|
||||||
}
|
}
|
||||||
}.bind(null, connector, sdiv, img));
|
}.bind(null, connector, sdiv, img));
|
||||||
img.src = connector.info.image.file;
|
img.src = connector.info.image.file;
|
||||||
|
|
Loading…
Reference in New Issue