Hi,
it seems the cycle event on projectModel has some weird behavirour. given the following ProjectModel, the onCycle event only triggers if i uncomment the follwoing lines
// listeners:{
// cycle:()=>{}
// },
new ProjectModel({
taskModelClass : MyModel,
transport : {
load : {
url : 'assets/data/launch-saas.json'
}
},
autoSync: false,
autoLoad : true,
taskStore: new TaskStore({
transformFlatData: true,
autoTree: true,
}),
onCycle:(event)=>{
const resolutions = event.schedulingIssue.getResolutions();
const deactivate = resolutions.filter((k) => k.$$name === 'DeactivateDependencyResolution');
if(deactivate.length === 0){
return;
}
deactivate[0].resolve();
console.log('resolve', deactivate[0]);
event.continueWithResolutionResult('Resume');
},
// comment in these lines to get it working
// listeners:{
// cycle:()=>{}
// },
// This config enables response validation and dumping of found errors to the browser console.
// It's meant to be used as a development stage helper only so please set it to false for production systems.
validateResponse : true
});
if the listener stays commented out it does not show any data and the onCycle event is not triggered.
Steps to reproduce:
- starting from gantt-5.3.5\examples\frameworks\angular\taskeditor
- replace launch-saas.json and app.config.ts (remove .txt extension, the forum doesnt like files ending in ts)
- in app.component.html add the attribute [displaySchedulingIssueResolutionPopup]="false" to <bryntum-gantt element.
if you now start the app you should see an empty data, after commenting in the listener.cycle it works