search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Bubble showAfter setting has no effect

Asked by Anonymous
3 years ago.

Below is my code for an event.data.area. I have tried several values in the ShowAfter property, but the bubble always opens immediatly.

I've read the documentation on the bubble class, but I still cannot get it to have a delayed opening.
https://api.daypilot.org/daypilot-bubble-showafter/

bubble: new DayPilot.Bubble({
    hideAfter: 2000,
    showAfter: 5000,
    animation: 'slow',
    onLoad: function (args) {
        args.html = infoBubbleHtml;
    }
}),
action: "Bubble",

Thank you in advance,

PS. We Love DayPilot !! This library is truly amazing. Nice Job!

Answer posted by Dan Letecky [DayPilot]
3 years ago.

The bubble opened by an active area (action: "Bubble") is always displayed immediately.

If you want to delay it you can use the following code:

args.data.areas = [
    {
        right: 0,
        top: 0,
        width: 20,
        height: 20,
        backColor: "red",
        bubble: new DayPilot.Bubble({
            showAfter: 5000,
            hideAfter: 2000
        }),
        onMouseEnter: function(args) {
            args.area.bubble.showEvent(args.source);
        },
        onMouseLeave: function(args) {
            args.area.bubble.delayedHide();
        }
    },
];

> PS. We Love DayPilot !! This library is truly amazing. Nice Job!

Great to hear that!

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.