coco/www/saved.html

40 lines
1.1 KiB
HTML
Raw Normal View History

2020-03-04 21:24:49 +00:00
<!DOCTYPE html>
<html>
<head>
<title>Plotting Data: COCO drawings</title>
<link rel="stylesheet" type="text/css" href="coco.css">
</head>
<body class='hideImages'>
<div class='buttons buttons-inline'>
<label id='convert'><input type='checkbox' id='loadImages'> images</label>
<label id='labelcheck'><input type='checkbox' id='loadLabels'> labels</label>
</div>
<div id='saved'>
{images}
</div>
<script type="text/javascript">
let loadImagesEl = document.getElementById('loadImages');
let loadLabelsEl = document.getElementById('loadLabels');
let setImageClass = function() {
if(loadImagesEl.checked) {
document.body.classList.remove('hideImages');
} else {
document.body.classList.add('hideImages');
}
}
let setLabelClass = function() {
if(loadLabelsEl.checked) {
document.body.classList.remove('hideLabels');
} else {
document.body.classList.add('hideLabels');
}
}
loadImagesEl.addEventListener('change', (e) => setImageClass());
loadLabelsEl.addEventListener('change', (e) => setLabelClass());
setImageClass();
setLabelClass();
</script>
</body>
</html>