Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Dynamically changing Gantt to-date #59

Closed
MarkRBM opened this issue May 2, 2014 · 4 comments
Closed

Dynamically changing Gantt to-date #59

MarkRBM opened this issue May 2, 2014 · 4 comments
Milestone

Comments

@MarkRBM
Copy link

MarkRBM commented May 2, 2014

I have to-date="endDate" and a function that is being called to change the value of endDate. When I set it to a date greater than the current endDate the gantt resizes to the correct date. When I try to reduce it again the value changes but the gantt dosn't resize itself.

Is this a bug or is there a way around this I am missing?

@Schweigi
Copy link
Member

Schweigi commented May 2, 2014

Currently the Gantt does expand the data range only but does not reduce it. This is because the user could have expanded the date range by scrolling left or right or by changing the view scale e.g. from day to month.

You could adjust the following code to overwrite this so that the columns are re-generated when the range got smaller:
https://github.com/Schweigi/angular-gantt/blob/master/src/logic/gantt.factory.js#L31-73
https://github.com/Schweigi/angular-gantt/blob/master/src/gantt.directive.js#L102-106

@MarkRBM
Copy link
Author

MarkRBM commented May 2, 2014

Thanks I did that today can work on a pull request after cleaning up the code if you want.

@Schweigi
Copy link
Member

Schweigi commented May 2, 2014

Ok perfect!

@julienmeyer
Copy link
Contributor

I need exactly the same behavior

@Toilal Toilal closed this as completed in 4fd9ced Sep 16, 2014
Toilal added a commit that referenced this issue Sep 16, 2014
Range collapse support and task truncation. Fix #59
@Toilal Toilal added this to the 0.6.2 milestone Sep 17, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants