Skip to content

Commit

Permalink
SVY-19548 Fullcalendar tooltips & UICONSTANTS.TOOLTIP_INITIAL_DELAY
Browse files Browse the repository at this point in the history
  • Loading branch information
lvostinar committed Sep 10, 2024
1 parent 4d7e054 commit 48be6f7
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,20 @@ export class FullCalendar extends ServoyBaseComponent<HTMLDivElement> implements
clickTimeout = null;
clickDelay = 300; //ms

private initialDelay = 750;
private dismissDelay = 5000;

constructor(private servoyService: ServoyPublicService,
tooltipSrv: TooltipService,
renderer: Renderer2, cdRef: ChangeDetectorRef,
logFactory: LoggerFactory) {
super(renderer, cdRef);
this.log = logFactory.getLogger('FullCalendar');
this.tooltipService = tooltipSrv;
this.initialDelay = servoyService.getUIProperty("tooltipInitialDelay");
if (this.initialDelay === null || isNaN(this.initialDelay)) this.initialDelay = 750;
this.dismissDelay = servoyService.getUIProperty("tooltipDismissDelay");
if (this.dismissDelay === null || isNaN(this.dismissDelay)) this.dismissDelay = 5000;
}

svyOnChanges(changes: SimpleChanges) {
Expand Down Expand Up @@ -525,7 +532,7 @@ export class FullCalendar extends ServoyBaseComponent<HTMLDivElement> implements
if (this.tooltipExpression) {
const tooltip = this.evaluateTooltipExpression(this.tooltipExpression, info.event);
info.el.onmouseenter = (jsEvent: MouseEvent) => {
this.tooltipService.showTooltip(jsEvent, tooltip, 750, 5000);
this.tooltipService.showTooltip(jsEvent, tooltip, this.initialDelay, this.dismissDelay);
};
info.el.onmouseleave = (jsEvent: MouseEvent) => {
this.tooltipService.hideTooltip()
Expand Down

0 comments on commit 48be6f7

Please sign in to comment.