Add number class selection dropdown
This commit is contained in:
parent
9092376998
commit
b3e03c2f7b
@ -7,6 +7,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<input type="file" id="bltFile">
|
<input type="file" id="bltFile">
|
||||||
<button onclick="clickBtn();">OK</button>
|
<button onclick="clickBtn();">OK</button>
|
||||||
|
<select id="numbers"><option value="native" selected>Native</option><option value="rational">Rational</option></select>
|
||||||
|
|
||||||
<table id="result"></table>
|
<table id="result"></table>
|
||||||
|
|
||||||
@ -15,6 +16,14 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
async function clickBtn() {
|
async function clickBtn() {
|
||||||
|
// Set numbers class
|
||||||
|
if (document.getElementById('numbers').value == 'native') {
|
||||||
|
py.pyRCV2.numbers.set_numclass(py.pyRCV2.numbers.Native);
|
||||||
|
}
|
||||||
|
if (document.getElementById('numbers').value == 'rational') {
|
||||||
|
py.pyRCV2.numbers.set_numclass(py.pyRCV2.numbers.Rational);
|
||||||
|
}
|
||||||
|
|
||||||
// Read BLT file
|
// Read BLT file
|
||||||
let bltFile = document.getElementById('bltFile').files[0];
|
let bltFile = document.getElementById('bltFile').files[0];
|
||||||
let text = await bltFile.text();
|
let text = await bltFile.text();
|
||||||
|
Reference in New Issue
Block a user