diff --git a/imgs/127ohm.png b/imgs/127ohm.png index 0902d1a..7042e1d 100644 Binary files a/imgs/127ohm.png and b/imgs/127ohm.png differ diff --git a/modules/resistors.js b/modules/resistors.js index 69a0cdb..a37fbf4 100644 --- a/modules/resistors.js +++ b/modules/resistors.js @@ -47,7 +47,7 @@ class Resistor { ${svg} ` - element.innerHTML += thesvg; + element.innerHTML = thesvg; } } @@ -57,7 +57,7 @@ class NestedResistor extends Resistor { constructor(l, func, instance) { super(func(l.map(e => e.getOhmage()))); this.func = func - this.children = flatten(l, instance.constructor.name); + this.children = flatten(l, instance); } cost() { return sum(this.children.map(e => e.cost()));