Skip to content

Commit fa03754

Browse files
fix(gsoc'24): corrected alignment of some element labels (#4278) (#347)
fix: corrected alignment of some element labels (#4278) Co-authored-by: Arnabdaz <[email protected]>
1 parent e231fd5 commit fa03754

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

src/simulator/src/modules/DigitalLed.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ export default class DigitalLed extends CircuitElement {
2727
// Calling base class constructor
2828
super(x, y, scope, 'UP', 1)
2929
this.rectangleObject = false
30-
this.setDimensions(10, 20)
30+
this.setWidth(10);
31+
this.upDimensionY = 20;
32+
this.downDimensionY = 40;
3133
this.inp1 = new Node(-40, 0, 0, this, 1)
3234
this.directionFixed = true
3335
this.fixedBitWidth = true

src/simulator/src/modules/PriorityEncoder.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ export default class PriorityEncoder extends CircuitElement {
2626
this.yOff = 2
2727
}
2828

29-
this.setDimensions(20, this.yOff * 5 * this.inputSize)
29+
this.setDimensions(20, this.yOff * 5 * this.inputSize + 10);
30+
this.rightDimensionX += 10;
3031
this.directionFixed = true
3132
this.rectangleObject = false
3233

src/simulator/src/modules/RGBLed.js

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export default class RGBLed extends CircuitElement {
2020
this.rectangleObject = false
2121
this.inp = []
2222
this.setDimensions(10, 10)
23+
this.downDimensionY = 40;
2324
this.inp1 = new Node(-40, -10, 0, this, 8)
2425
this.inp2 = new Node(-40, 0, 0, this, 8)
2526
this.inp3 = new Node(-40, 10, 0, this, 8)

src/simulator/src/modules/VariableLed.js

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export default class VariableLed extends CircuitElement {
2626
super(x, y, scope, 'UP', 8)
2727
this.rectangleObject = false
2828
this.setDimensions(10, 20)
29+
this.downDimensionY = 40;
2930
this.inp1 = new Node(-40, 0, 0, this, 8)
3031
this.directionFixed = true
3132
this.fixedBitWidth = true

0 commit comments

Comments
 (0)