Swiper removed

- Swiper removal work in progress
+ Fine debugging for every js-file
This commit is contained in:
Daniel
2025-03-17 11:07:50 +01:00
parent 680434e5e8
commit ca2945ac22
8 changed files with 419 additions and 156 deletions

View File

@ -1,6 +1,9 @@
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// % RESPONSIVITY
// local debugging: print the name of every executed funtion to the console
var debug_responsivity_daniel = 0;
var nColumns = 1; // Viewport is subdivided in nColumns columns.
var nRows = 1; // Viewport is subdivided in nRows rows.
var gridCountGraphics = 2; // Number of displayed graphics-swipers.
@ -10,6 +13,10 @@ let paramSlider = [0,1,2,3]; // the number of the parameter slider to open
let prevActiveSlider = 0;
function createGrid() {
if (debug_responsivity_daniel) {
console.log("%cfunction: createGrid", "color:white;background:olive");
}
// Creates grid-elements. By default only the first one is shown
// and
// takes the whole viewport.
@ -24,6 +31,10 @@ function createGrid() {
}
function determineViewportSize() {
if (debug_responsivity_daniel) {
console.log("%cfunction: determineViewportSize", "color:white;background:olive");
}
// Number of columns 'nColumns' and rows 'nRows' is determined depending on available
// viewport-size.
@ -52,11 +63,19 @@ function determineViewportSize() {
}
function sizeChange() {
if (debug_responsivity_daniel) {
console.log("%cfunction: sizeChange", "color:white;background:olive");
}
determineViewportSize();
adjustGrid();
}
function adjustGrid() {
if (debug_responsivity_daniel) {
console.log("%cfunction: adjustGrid", "color:white;background:olive");
}
// Determines size of grid-elements depending on number of columns 'nColumns' and
// rows 'nRows'
@ -147,9 +166,13 @@ function adjustGrid() {
}
function style(s, width, height) {
if (debug_responsivity_daniel) {
console.log("%cfunction: style", "color:white;background:olive");
}
if (width) {
paramSlider[prevActiveSlider] = s;
prevActiveSlider = s;
// paramSlider[prevActiveSlider] = s;
// prevActiveSlider = s;
elements[s].style.display = "inline-block";
elements[s].style.width = width;
} else {