Skip to content

Commit

Permalink
removal of resistive element
Browse files Browse the repository at this point in the history
  • Loading branch information
smariel committed Mar 6, 2022
1 parent 529659e commit 88fb946
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion html/itemEditor.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ <h3>Characteristics</h3>
<optgroup label="Other">
<option value="6">Dummy (wire)</option>
<option value="7">Perfect (no loss)</option>
<option value="8">Resistive Element</option>
<!--<option value="8">Resistive Element</option>-->
</optgroup>
</select>
</div>
Expand Down
10 changes: 8 additions & 2 deletions js/class.Item.Source.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class Source extends Item {

// Check if the item is a Dummy reg
isDummy() {
return ('6' == this.characs.regtype);
return ('6' == this.characs.regtype || '8' == this.characs.regtype);
}


Expand All @@ -118,7 +118,7 @@ class Source extends Item {

// Check if the item is Resistive Element
isResistive() {
return ('8' == this.characs.regtype);
return false;
}


Expand Down Expand Up @@ -600,6 +600,12 @@ class Source extends Item {
};
}

// compatibility with < v2.1.0
// conversions of (deleted) resistor to dummy
if(8 == this.characs.regtype) {
this.characs.regtype = 6;
}

return properties;
}
}
Expand Down

0 comments on commit 88fb946

Please sign in to comment.