Our state of the art Gantt chart


Post by johanbrodin »

Hi,

We have turned on the dependencyEditFeature and noticed that you can only open it by double clicking on a dependency line. The rest of the items on gantt can be opened by right clicking.

To make the experience consistent please also support open dependencyEditFeature right clicking on a dependency line (see picture v6.0.4)

Also in general it's hard to highlight dependencies lines so if you can improve that as well it would be great.

Regards
Johan

Attachments
edit dependency.png
edit dependency.png (317.36 KiB) Viewed 189 times
Last edited by johanbrodin on Fri Aug 02, 2024 5:07 pm, edited 1 time in total.

Post by tasnim »

Hi,

You can increase the dependency clickWidth by setting https://bryntum.com/products/schedulerpro/docs/api/Scheduler/feature/Dependencies#config-clickWidth

To make the experience consistent please also support open dependencyEditFeature double clicking on a dependency line (see picture v6.0.4)

This does work, you can check it here https://bryntum.com/products/gantt/examples/advanced/

Hope it helps.

Best regards,
Tasnim


Post by johanbrodin »

HI Tasnim,

I got clickWidth working thank you!

The right click is however not working for me on your provided example. I am using a Mac so right click for me is two finger click on the touch bar. Have you tried this?

Regards
Johan


Post by tasnim »

Hi,

This is not supported out of the box but you can achieve it by using a Menu widget https://bryntum.com/products/gantt/docs/api/Core/widget/Menu
And also use this https://bryntum.com/products/gantt/docs/api/Core/helper/EventHelper#function-addListener-static to add listener

Here is an example code snippet


EventHelper.addListener(gantt.element, 'contextmenu', (event) => {
    event.preventDefault();
    const menu = new Menu({
        anchor   : true,
        autoShow : false,
        autoClose : false,
        closeAction : 'hide',
        items    : [
            {
                icon : 'b-fw-icon b-icon-add',
                text : 'Add'
            },
            {
                icon : 'b-fw-icon b-icon-trash',
                text : 'Remove'
            },
            {
                icon     : 'b-fw-icon b-icon-lock',
                disabled : true,
                text     : 'I am disabled'
            },
            {
                text : 'Sub menu',
                menu : [{
                    icon : 'b-fw-icon b-fa-play',
                    text : 'Play'
                }]
            }
        ],
        // Method is called for all ancestor levels
        onItem({ item }) {
            Toast.show('You clicked ' + item.text);
        }
    });
    menu.showBy({ domEvent : event });
}, {
    delegate : '.b-sch-dependency'
});

Best regards,
Tasnim


Post by johanbrodin »

Hi Tasnim,

Since everything else can be opened on the Gantt roadmap with right click on mac this sounds like a bug. Can you create a bug ticket for this so we can follow the progress.

Happy to wait for the fix instead of doing workarounds.

Regards
Johan


Post by marcio »

Hey Johan,

I created a ticket to implement that, thanks for your suggestion.

Please watch the ticket to receive live updates https://github.com/bryntum/support/issues/9733.

Best regards,
Márcio


Post Reply