auto change font size to small if text is too long
parent
9f736816f2
commit
96f479f06a
|
@ -1014,6 +1014,12 @@
|
||||||
|
|
||||||
document.querySelector('#shx-fontSize').value = 'Klein #small';
|
document.querySelector('#shx-fontSize').value = 'Klein #small';
|
||||||
document.querySelector('#shx-fontSize').dispatchEvent(new Event('change'));
|
document.querySelector('#shx-fontSize').dispatchEvent(new Event('change'));
|
||||||
|
|
||||||
|
document.querySelector('#shx-info-text').style.display = 'block';
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
document.querySelector('#shx-info-text').style.display = 'none';
|
||||||
|
}, 5000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1134,19 +1140,18 @@
|
||||||
|
|
||||||
this.Viewer3DContainer.appendChild(this.invisibleProductID);
|
this.Viewer3DContainer.appendChild(this.invisibleProductID);
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
setTimeout(createIFrame.bind(this), 1000);
|
|
||||||
|
|
||||||
// create text below the iframe for information if the text is too long and we set the font size to small
|
// create text below the iframe for information if the text is too long and we set the font size to small
|
||||||
|
|
||||||
this.infoText = document.createElement('span');
|
this.infoText = document.createElement('span');
|
||||||
this.infoText.innerText = 'Here1 Text ist zu lang. Wir haben die Schriftgröße auf klein gesetzt. Bitte überprüfe deinen Text.';
|
this.infoText.id = 'shx-info-text';
|
||||||
/* this.infoText.classList.add('shx-info-text'); */
|
this.infoText.style.display = 'none';
|
||||||
|
this.infoText.innerText = 'Text ist zu lang. Wir haben die Schriftgröße auf klein gesetzt. Bitte überprüfe deinen Text.';
|
||||||
this.container.appendChild(this.infoText);
|
this.container.appendChild(this.infoText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setTimeout(createIFrame.bind(this), 1000);
|
||||||
|
}
|
||||||
|
|
||||||
initCurrentVariant(id) {
|
initCurrentVariant(id) {
|
||||||
this.currentVariant = id;
|
this.currentVariant = id;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue