초기 PM 소스 전체 업로드
This commit is contained in:
60
libs/gsimViewer/style.js
Normal file
60
libs/gsimViewer/style.js
Normal file
@@ -0,0 +1,60 @@
|
||||
document.querySelectorAll('.slider').forEach(slider => {
|
||||
slider.addEventListener('input', function () {
|
||||
let min = parseFloat(this.min);
|
||||
let max = parseFloat(this.max);
|
||||
let curVal = parseFloat(this.value);
|
||||
let val = ((curVal-min)/(max-min))*100;
|
||||
// if (slider.id == 'zScale-slider') {
|
||||
// this.style.background = `linear-gradient(to right, #fff ${val * 10}%, #aaa ${val * 10}%)`;
|
||||
// } else {
|
||||
this.style.background = `linear-gradient(to right, #fff ${val}%, #aaa ${val}%)`;
|
||||
// }
|
||||
});
|
||||
});
|
||||
|
||||
document.querySelectorAll('input[type="checkbox"][name="layer"]').forEach(checkbox => {
|
||||
checkbox.addEventListener('change', () => {
|
||||
if(checkbox.closest('.checkbox-label').classList.contains('disabled')){
|
||||
checkbox.checked = false;
|
||||
}
|
||||
const label = checkbox.closest('.checkbox-label');
|
||||
const visibilityIcon = label.querySelector('.visibility-icon');
|
||||
|
||||
const visibleSrc = checkbox.dataset.iconVisible;
|
||||
const invisibleSrc = checkbox.dataset.iconInvisible;
|
||||
|
||||
if (!checkbox.checked) {
|
||||
// label.style.opacity = '0.2';
|
||||
if (visibilityIcon) visibilityIcon.src = invisibleSrc;
|
||||
} else {
|
||||
// label.style.opacity = '1';
|
||||
if (visibilityIcon) visibilityIcon.src = visibleSrc;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
document.querySelectorAll('input[type="checkbox"][name="list-set"]').forEach(checkbox => {
|
||||
checkbox.addEventListener('change', () => {
|
||||
const label = checkbox.closest('.checkbox-label');
|
||||
const visibilityIcon = label.querySelector('.visibility-icon');
|
||||
|
||||
const visibleSrc = checkbox.dataset.iconVisible;
|
||||
const invisibleSrc = checkbox.dataset.iconInvisible;
|
||||
|
||||
if (!checkbox.checked) {
|
||||
// label.style.opacity = '0.2';
|
||||
if (visibilityIcon) visibilityIcon.src = invisibleSrc;
|
||||
} else {
|
||||
// label.style.opacity = '1';
|
||||
if (visibilityIcon) visibilityIcon.src = visibleSrc;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
document.querySelector('.dropdown-toggle').addEventListener('click', function () {
|
||||
document.querySelector('.dropdown').classList.toggle('open');
|
||||
});
|
||||
Reference in New Issue
Block a user