Skip to content

Commit e1b834d

Browse files
chore: add helplink to Two’s Complement component (CircuitVerse#823)
* docs: add helplink to Two’s Complement component * chore: apply changes in v1 version --------- Co-authored-by: Nihal <65150640+Nihal4777@users.noreply.github.com>
1 parent 3b2e81a commit e1b834d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/simulator/src/modules/TwoComplement.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export default class TwoComplement extends CircuitElement {
6969
const yy = this.y
7070
ctx.beginPath()
7171
ctx.fillStyle = 'black'
72-
fillText(ctx, "2'", xx, yy, 10)
72+
fillText(ctx, "2's", xx, yy, 10)
7373
if (
7474
(this.hover && !simulationArea.shiftDown) ||
7575
simulationArea.lastSelected === this ||
@@ -93,6 +93,8 @@ export default class TwoComplement extends CircuitElement {
9393
* @type {string}
9494
* @category modules
9595
*/
96+
97+
TwoComplement.prototype.helplink = 'https://docs.circuitverse.org/chapter4/chapter4-misc#twos-complement'
9698
TwoComplement.prototype.tooltipText =
9799
"Two's Complement ToolTip : Calculates the two's complement"
98100
TwoComplement.prototype.helplink =

v1/src/simulator/src/modules/TwoComplement.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export default class TwoComplement extends CircuitElement {
6969
const yy = this.y
7070
ctx.beginPath()
7171
ctx.fillStyle = 'black'
72-
fillText(ctx, "2'", xx, yy, 10)
72+
fillText(ctx, "2's", xx, yy, 10)
7373
if (
7474
(this.hover && !simulationArea.shiftDown) ||
7575
simulationArea.lastSelected === this ||
@@ -93,6 +93,8 @@ export default class TwoComplement extends CircuitElement {
9393
* @type {string}
9494
* @category modules
9595
*/
96+
97+
TwoComplement.prototype.helplink = 'https://docs.circuitverse.org/chapter4/chapter4-misc#twos-complement'
9698
TwoComplement.prototype.tooltipText =
9799
"Two's Complement ToolTip : Calculates the two's complement"
98100
TwoComplement.prototype.helplink =

0 commit comments

Comments
 (0)