chore: Änderungen commited

This commit is contained in:
2025-05-14 11:55:58 +02:00
parent 2b19cb000b
commit fd293e53e1
3 changed files with 228 additions and 11 deletions

View File

@@ -813,12 +813,43 @@ function showUINotification(message, type = 'info', duration = 3000) {
const closeButton = document.createElement('span');
closeButton.innerHTML = '×';
closeButton.style.position = 'absolute';
// Deaktiviere Bearbeitungsfunktionen
cy.nodes().grabify();
cy.container().classList.remove('editing-mode');
cy.removeListener('dragfree');
cy.removeListener('dblclick');
cy.removeListener('cxttap');
closeButton.style.top = '0.25rem';
closeButton.style.right = '0.5rem';
closeButton.style.fontSize = '1.25rem';
closeButton.style.cursor = 'pointer';
closeButton.onclick = () => {
notification.style.opacity = '0';
notification.style.transform = 'translateY(-20px)';
setTimeout(() => {
if (notification.parentNode === container) {
container.removeChild(notification);
}
}, 300);
};
notification.appendChild(closeButton);
// Zur Seite hinzufügen
container.appendChild(notification);
// Animation starten
setTimeout(() => {
notification.style.opacity = '1';
notification.style.transform = 'translateY(0)';
}, 10);
// Automatisch ausblenden, wenn keine Dauer von 0 übergeben wurde
if (duration > 0) {
setTimeout(() => {
if (notification.parentNode === container) {
notification.style.opacity = '0';
notification.style.transform = 'translateY(-20px)';
setTimeout(() => {
if (notification.parentNode === container) {
container.removeChild(notification);
}
}, 300);
}
}, duration);
}
}