Skip to content
Snippets Groups Projects
Commit cf5ac12e authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

feat: include time in tooltip if event is rendered very small

refs #173
parent bfe7f813
No related branches found
No related tags found
No related merge requests found
Pipeline #3475 passed
......@@ -379,6 +379,16 @@ export default {
return h('div', { class: 'fc-event-main-frame' }, content)
},
eventDidMount({ el, event, timeText }) {
const { durationMinutes } = event.extendedProps
let { title } = event.extendedProps
if (durationMinutes < slotDurationMinutes) {
title = `${timeText}: ${title}`
}
// here we add a simple tooltip to every event, so that the full title
// of a show can be viewed
el.setAttribute('title', title)
},
datesSet: (view) => {
if (
this.currentStart?.toISOString?.() !== view.start.toISOString() ||
......@@ -393,11 +403,6 @@ export default {
this.currentEnd = view.end
}
},
eventDidMount({ event, el }) {
// here we add a simple tooltip to every event, so that the full title
// of a show can be viewed
el.setAttribute('title', event.title)
},
eventClick: this.eventSelected,
select: this.createEvent,
selectable: true,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment