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

Link Connector Arrows

Asked by Steve Lee
1 year ago.

In there any way to toggle the event connector links (arrows) on and off within the scheduler?

Comment posted by Dan Letecky [DayPilot]
1 year ago.

If you mean the arrow ends of existing links, they can be hidden using CSS.

The arrows are marked with the following CSS classes:

scheduler_default_link_arrow_down
scheduler_default_link_arrow_up
scheduler_default_link_arrow_left
scheduler_default_link_arrow_right

You can hide them like this:

.scheduler_default_link_arrow_down,
.scheduler_default_link_arrow_up,
.scheduler_default_link_arrow_left,
.scheduler_default_link_arrow_right {
    display: none;
}

Comment posted by Steve Lee
1 year ago.

Hi Dan

Thanks for the answer but that's not quite what I'm looking for.

I'm looking for a way to toggle the entire link connector on and off. Our DB has 1000 + events and each event is linked to between 4 and 10 other events which makes for a spaghetti of link connectors.

I'm looking for a way to toggle the these links / connectors on as required, off as default.

Is this possible?

Answer posted by Dan Letecky [DayPilot]
1 year ago.

I see.

1. You can simply add/remove the links from the Scheduler as needed, like this:

const linksToBeDisplayed = [ /* ... */ ];
dp.update({links: linksToBeDisplayed});

2. Or you can mark the links with custom CSS class (or classes) using "cssClass" property (see also https://api.daypilot.org/daypilot-link-data/) and then show/hide them using CSS.

The first option will probably be more elegant and efficient.

Comment posted by Steve Lee
1 year ago.

Much appreciated Dan. I'll give it a whirl.

Comment posted by Dan Letecky [DayPilot]
1 year ago.

Update:

In the latest sandbox build (2023.2.5579), the `update({links})` call is now optimized. If you only include `links` in the `options` parameter of the `update()` method it will perform a quick update of links only (instead of a full reload like in previous versions).

https://api.daypilot.org/daypilot-scheduler-update/

Comment posted by Steve Lee
1 year ago.

Excellent, thanks Dan.

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