chore: Änderungen commited
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user