Skip to content

Commit

Permalink
select sample path
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-coding committed Dec 4, 2023
1 parent 0fbfba0 commit 8ea96d0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@
viewer.showZasGray(document.getElementById('zValue').checked);

let idxFile = 2;
let samples = {};
checkFileExists('samples/circles with R.nc', ''+(idxFile++), '[GCode] Circles with R words');
checkFileExists('samples/B Fabric Nesting.plt', ''+(idxFile++), '[HPGL] B Fabric Nesting');
checkFileExists('samples/S Fabric Nesting.plt', ''+(idxFile++), '[HPGL] S Fabric Nesting');
Expand Down Expand Up @@ -236,6 +237,11 @@
if (idx == 1) {
document.getElementById('ncFile').click();
}
else if (idx >= 2) {
if (idx in samples) {
console.log('Requesting ...', samples[idx]);
}
}
}

function loadPath() {
Expand Down Expand Up @@ -341,6 +347,8 @@
option.value = key;
var select = document.getElementById('selectFile');
select.appendChild(option);

samples[key] = filePath;
//console.log('file existed');
}
else {
Expand Down

0 comments on commit 8ea96d0

Please sign in to comment.