Pinout labels (#2297)

* add label to pins

* styling

* styling

* styling
This commit is contained in:
David Holdeman 2021-02-06 13:57:19 -06:00 committed by GitHub
parent a8dc185de2
commit 32408cf58e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -57,6 +57,7 @@ function adjustMarkers() {
pins[i].style.width = height + "px";
pins[i].style.marginTop = "-" + (height * 0.5) + "px";
pins[i].style.marginLeft = "-" + (height * 0.5) + "px";
pins[i].style.fontSize = (height * 0.5) + "px";
}
}
@ -82,6 +83,7 @@ window.addEventListener('load', function() {
var img = document.getElementById("connector-img");
var imgHeight = img.naturalHeight;
var imgWidth = img.naturalWidth;
pdiv.textContent = pinfo.pin;
pdiv.style.top = ((pinfo.y / imgHeight) * 100) + "%";
pdiv.style.left = ((pinfo.x / imgWidth) * 100) + "%";
pdiv.dataset.type = pin.type;

View File

@ -5,10 +5,14 @@
background-color: white;
border: 2px blue solid;
cursor: pointer;
color: black;
text-align: center;
line-height: 200%;
}
.pin-marker:hover {
background-color: #f15a24;
color: white;
}
.pin-marker.highlight {