Skip to content

feat: option to make timeline items movable but not resizable#2032

Open
feedingaliencat wants to merge 1 commit intovisjs:masterfrom
feedingaliencat:updateRangeDuration
Open

feat: option to make timeline items movable but not resizable#2032
feedingaliencat wants to merge 1 commit intovisjs:masterfrom
feedingaliencat:updateRangeDuration

Conversation

@feedingaliencat
Copy link

@feedingaliencat feedingaliencat commented Mar 12, 2026

At the moment, the option to control if a timeline item is movable is the same which controls also its ability to be stretched or shrinked:

editable: { updateTime: boolean; }

This commit wants to split these two operations in two options:

editable: {
    updateTime: boolean; // the item can be moved with drag and drop
    updateDuration: boolean; // the item can be stretched or shirnked
}

BREAKING CHANGE: The behaviour changes from the previous implementation. Users who wants to have both the actions need to set updateDuration: true in their codebase.

Screen recording of the case updateTime = true and updateDuration = false:
screen_recording.webm

This PR is a port of @javdome 's #1726 on top the current vis-timeline HEAD.

Fixes #309
Fixes #273

At the moment, the option to control if a timeline item is movable
is the same which controls also its ability to be stretched or shrinked:

    editable: { updateTime: boolean; }

This commit wants to split these two operations in two options:

    editable: {
        updateTime: boolean; // the item can be moved with drag and drop
        updateDuration: boolean; // the item can be stretched or shirnked
    }

BREAKING CHANGE: The behaviour changes from the previous implementation.
Users who wants to have both the actions need to set `updateDuration: true`
in their codebase.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: range timeline items that are not resizable, but are movable Enable range item editing except change start and end time

1 participant