Pinout labels (#2297)
* add label to pins * styling * styling * styling
This commit is contained in:
parent
a8dc185de2
commit
32408cf58e
|
@ -57,6 +57,7 @@ function adjustMarkers() {
|
||||||
pins[i].style.width = height + "px";
|
pins[i].style.width = height + "px";
|
||||||
pins[i].style.marginTop = "-" + (height * 0.5) + "px";
|
pins[i].style.marginTop = "-" + (height * 0.5) + "px";
|
||||||
pins[i].style.marginLeft = "-" + (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 img = document.getElementById("connector-img");
|
||||||
var imgHeight = img.naturalHeight;
|
var imgHeight = img.naturalHeight;
|
||||||
var imgWidth = img.naturalWidth;
|
var imgWidth = img.naturalWidth;
|
||||||
|
pdiv.textContent = pinfo.pin;
|
||||||
pdiv.style.top = ((pinfo.y / imgHeight) * 100) + "%";
|
pdiv.style.top = ((pinfo.y / imgHeight) * 100) + "%";
|
||||||
pdiv.style.left = ((pinfo.x / imgWidth) * 100) + "%";
|
pdiv.style.left = ((pinfo.x / imgWidth) * 100) + "%";
|
||||||
pdiv.dataset.type = pin.type;
|
pdiv.dataset.type = pin.type;
|
||||||
|
|
|
@ -5,10 +5,14 @@
|
||||||
background-color: white;
|
background-color: white;
|
||||||
border: 2px blue solid;
|
border: 2px blue solid;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
color: black;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 200%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pin-marker:hover {
|
.pin-marker:hover {
|
||||||
background-color: #f15a24;
|
background-color: #f15a24;
|
||||||
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pin-marker.highlight {
|
.pin-marker.highlight {
|
||||||
|
|
Loading…
Reference in New Issue