Skip to content

Dependency arrows get stuck when dragging the successor and drag fails #13789

Description

@ahmadzaheer-dev

Forum post

Hi Bryntum team,
I encountered this bug where the dependency arrows get stuck when dragging and dropping the successor and the drop fails.

trial\examples\frameworks\react-vite\inline-data\AppConfig.tsx

import { BryntumSchedulerProProjectModelProps, BryntumSchedulerProProps } from '@bryntum/schedulerpro-react';
import { projectData } from './AppData';

export const schedulerProProps : BryntumSchedulerProProps = {
    startDate      : new Date(2023, 6, 30),
    endDate        : new Date(2023, 7, 13),
    tickSize       : 100,
    rowHeight      : 173,
    // Small margin leaves little vertical clearance between the two rows, which makes
    // RectangularPathFinder fail to route the line and fall back to the lineDef adjusters
    resourceMargin : 2,
    rowLines       : false,
    columns        : [
        { text : 'Expedition', field : 'name', width : 200 }
    ],
    nestedEventsFeature : {
        eventLayout             : 'stack',
        headerHeight            : 25,
        allowDeNestingOnDrop    : false,
        constrainResizeToParent : false
    },
    dependenciesFeature : {
        clickWidth        : 5,
        radius            : 5,
        terminalSize      : 16,
        terminalHideDelay : 200,
        showLagInTooltip  : true
        // NOTE: drawAroundParents is intentionally NOT set, i.e. left at its documented default
    },
    dependencyEditFeature : true,
    nonWorkingTimeFeature : false
};

export const projectProps : BryntumSchedulerProProjectModelProps = {
    eventStore   : { tree : true },
    resources    : projectData.resources,
    events       : projectData.events,
    assignments  : projectData.assignments,
    dependencies : projectData.dependencies
};

trial\examples\frameworks\react-vite\inline-data\AppData.ts

// Minimal data set reproducing the nested-events dependency line adjuster RangeError.
// Ids mirror the official "nested-events-dependencies" demo: event 110 -> resource 4 (Mont Blanc),
// event 120 -> resource 5 (Matterhorn), dependency 13 between them (cross-row, required by the bug).
export const projectData = {
    resources : [
        { id : 4, name : 'Mont Blanc' },
        { id : 5, name : 'Matterhorn' }
    ],

events : [
    {
        id       : 110,
        name     : 'Planning',
        children : [
            { id : 111, name : 'Find sponsors', startDate : '2023-08-01', duration : 5, percentDone : 80 },
            { id : 112, name : 'Secure funds', startDate : '2023-08-01', duration : 5, percentDone : 90 },
            { id : 113, name : 'Contract guide', startDate : '2023-08-01', duration : 2, percentDone : 100 }
        ]
    },
    {
        id       : 120,
        name     : 'Planning',
        children : [
            { id : 121, name : 'Find sponsors', startDate : '2023-08-02', duration : 4, percentDone : 40 },
            { id : 122, name : 'Secure funds', startDate : '2023-08-02', duration : 4, percentDone : 20 },
            { id : 123, name : 'Contract guide', startDate : '2023-08-02', duration : 2, percentDone : 10 }
        ]
    }
],

assignments : [
    { id : 110, event : 110, resource : 4 },
    { id : 120, event : 120, resource : 5 }
],

dependencies : [
    // Cross-resource, so generateBoundaryBoxes() populates lineDef.otherBoxes
    { id : 13, from : 110, to : 120 }
]
};

the only deviation from defaults is enabling nestedEvents while leaving dependencies.drawAroundParents unset.

I have attached a video of the bug reproduction as well.

Bryntum Scheduler Pro (trial) 7.3.5
Stack : React 19 + Vite 5, TypeScript
Base : examples/frameworks/react-vite/inline-data from the 7.3.5 trial distribution

dependency.arrow.getting.stuck.mp4

Regards,
amadavan

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

OEMOEM customerbugSomething isn't workingforumIssues from forumpremiumreproducedresolvedFixed but not yet released (available in the nightly builds)well-scoped

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions