chore(scenery): advanced active train tooltip information

This commit is contained in:
2025-07-11 15:33:28 +02:00
parent 8e713a5c6e
commit 3bf1db52b4
5 changed files with 41 additions and 26 deletions
+2
View File
@@ -34,6 +34,7 @@ export const useTooltipStore = defineStore('tooltipStore', {
this.content = '';
},
// Tooltip handler reading attributes of DOM elements
handle(e: MouseEvent) {
const targetEl = e
.composedPath()
@@ -45,6 +46,7 @@ export const useTooltipStore = defineStore('tooltipStore', {
return;
}
// Tooltip content is a string but may be parsed to objects / html in corresponding tooltip type components
const tooltipType = targetEl.getAttribute('data-tooltip-type');
const tooltipContent = targetEl.getAttribute('data-tooltip-content');