Fix elevation view styles
This commit is contained in:
12
src/index.js
12
src/index.js
@@ -208,13 +208,11 @@ document.querySelector('#roll-dice').addEventListener('click', () => {
|
||||
});
|
||||
});
|
||||
|
||||
// document.querySelectorAll('[name="select-elevation"]').forEach(el => {
|
||||
// const gameboard = document.querySelector('.gameboard');
|
||||
|
||||
// el.addEventListener('change', function (e) {
|
||||
// gameboard.dataset.viewElevation = this.value
|
||||
// });
|
||||
// });
|
||||
document.querySelectorAll('[name="select-elevation"]').forEach(el => {
|
||||
el.addEventListener('change', function (e) {
|
||||
document.querySelector('object').contentDocument.querySelector('.grid').dataset.viewElevation = this.value;
|
||||
});
|
||||
});
|
||||
|
||||
contentVisToggleEl.addEventListener('input', toggleContentVis);
|
||||
contentVisToggleEl.checked = (localStorage.getItem('content-visibility') !== 'false');
|
||||
|
||||
@@ -3,7 +3,7 @@ async function loadScript(scenario, svg, script) {
|
||||
const scriptEl = document.createElementNS("http://www.w3.org/2000/svg", 'script');
|
||||
|
||||
scriptEl.onload = () => {
|
||||
console.log('map.js loaded');
|
||||
console.log(`${script}.js loaded`);
|
||||
resolve();
|
||||
};
|
||||
|
||||
@@ -18,7 +18,6 @@ async function loadScript(scenario, svg, script) {
|
||||
scriptEl.dataset.cols = dataset.cols;
|
||||
}
|
||||
|
||||
// scriptEl.setAttributeNS(null, 'href', '../../map.js');
|
||||
scriptEl.setAttributeNS(null, 'href', `../../${script}.js`);
|
||||
svg.append(scriptEl);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user