Skip to content

Conversation

lucfranken
Copy link

@lucfranken lucfranken commented Apr 15, 2025

In follow up on: #323 (comment)

image

Allows to set the readonly flags in the tasks array. Which allows to turn on/off the editing of dates and progress per task.

Example in the README:

image

It is shown as a proof of concept but works.

Currently it works by just not showing the handles to edit the dates. Do you like to further secure those modifications in for example the event handlers? For example I do not see a check here for this.gantt.options.readonly_progress but only for the generic read-only flag.

    update_progressbar_position() {
        if (this.invalid || this.gantt.options.readonly) return;
        this.$bar_progress.setAttribute('x', this.$bar.getX());

        this.$bar_progress.setAttribute(
            'width',
            this.calculate_progress_width(),
        );
    }

Is that intentional or just an omission in the checks to make them exhaustive?

Allows to set the readonly flags in the tasks array. Which allows to turn on/off the editing of dates and progress per task.
@lucfranken lucfranken changed the title Proof of concept for fixes #323 Allow Tasks to Be Editable - per task/bar - fixes #323 Apr 15, 2025
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.

1 participant