Skip to content

Commit 7e81ea1

Browse files
committed
fix bug: custom component can't accept decimals
1 parent 0e2a3a7 commit 7e81ea1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

smith_chart/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ <h5 class="modal-title" id="customZModalTitle">Modal title</h5>
530530
<div id="customZValidWarning" class="text-danger" style="display:none">
531531
If the textbox contains a comma it's assumed your data is comma separated, otherwise assumes whitespace separated.
532532
Each line must have 3 non-blank numberical values.
533-
The only accepted characters are 0-9, '-', '+', e, E and ','.
533+
The only accepted characters are 0-9, '-', '+', '.', e, E and ','.
534534
Frequency must be increasing
535535
</div>
536536
</div>

smith_chart/js/smith_tool.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1382,7 +1382,7 @@ function createCustomZModal (index) {
13821382
checkCustomZValid();
13831383
}
13841384

1385-
const regexCustomZ = /[^0-9,eE\s\-\+]/; //list of acceptable characters
1385+
const regexCustomZ = /[^0-9,eE\s\-\+\.]/; //list of acceptable characters
13861386
const regexCustomZComma = /[,]/;
13871387
var customZImpedanceTable = [];
13881388

0 commit comments

Comments
 (0)