fix events not being removed

This commit is contained in:
Scott Bell 2024-12-10 12:01:27 +01:00
parent 7b22cf3371
commit 7af3996d29
2 changed files with 3 additions and 8 deletions

View File

@ -318,7 +318,7 @@ export default {
const eventWrapper = this.createEventWrapper(index, item);
containerElement.appendChild(eventWrapper);
}
console.debug('🧟 Event time:', new Date(item.time).toISOString());
console.debug('🧟 Event time:', new Date(item.time).toTimeString());
console.debug('🧟 Scaled X position:', this.xScale(item.time));
},
updateExistingEventWrapper(existingEventWrapper, event) {
@ -329,6 +329,7 @@ export default {
const id = `${ID_PREFIX}${event.time}`;
const eventWrapper = document.createElement('div');
eventWrapper.ariaLabel = id;
eventWrapper.setAttribute('id', id);
eventWrapper.classList.add(EVENT_WRAPPER_CLASS);
eventWrapper.style.left = `${this.xScale(event.time)}px`;
//create event vertical tick indicator
@ -340,9 +341,7 @@ export default {
//handle mousedown event to show the event in a large view
eventWrapper.addEventListener('mousedown', (e) => {
if (e.button === 0) {
this.expand(event.time);
}
console.debug('🧟 Event clicked:', event);
});
return eventWrapper;

View File

@ -145,7 +145,6 @@ export default {
}
}
console.debug('🗺️ Calculated clientWidth:', clientWidth);
return clientWidth;
},
updateViewBounds(bounds, isTick) {
@ -346,9 +345,6 @@ export default {
let imageWrapper = this.createImageWrapper(index, item, showImagePlaceholders);
containerElement.appendChild(imageWrapper);
}
console.debug('🪝 Event time:', new Date(item.time).toISOString());
console.debug('🪝 Scaled X position:', this.xScale(item.time));
},
setImageDisplay(imageElement, showImagePlaceholders) {
if (showImagePlaceholders) {