make circuitcore.js draw circuit preview correctly, and use tabs instead of spaces

This commit is contained in:
redbirdly 2025-02-22 17:51:41 +08:00 committed by GitHub
parent e5e2dc651b
commit fe1e9a8963
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 124 additions and 124 deletions

View File

@ -223,16 +223,16 @@ elements.four_bit_selector_circuit = {
cc_stableTick: function(pixel) {
var pins = [
// First 4-bit input (A)
[-1, -2, true], // A0
[-3, -2, true], // A1
[-5, -2, true], // A2
[-7, -2, true], // A3
[-7, -2, true], // A0
[-5, -2, true], // A1
[-3, -2, true], // A2
[-1, -2, true], // A3
// Second 4-bit input (B)
[7, -2, true], // B0
[5, -2, true], // B1
[3, -2, true], // B2
[1, -2, true], // B3
[1, -2, true], // B0
[3, -2, true], // B1
[5, -2, true], // B2
[7, -2, true], // B3
// Selection pin (Sel)
[9, 0, true], // Selection (Sel)
@ -1930,7 +1930,7 @@ document.addEventListener('keydown', function(event) {
}
});
function drawCircuitExtras() {
function drawCircuitExtras(ctx) {
if (elements[currentElement].isCircuitCore && elements[currentElement].previewSize) {
var circuitWidth = elements[currentElement].previewSize[0];
var circuitHeight = elements[currentElement].previewSize[1];