bryntum / support

An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
https://www.bryntum.com
53 stars 6 forks source link

eventBuffer conflicts with fillTicks #9380

Open egorkel-altexsoft opened 1 month ago

egorkel-altexsoft commented 1 month ago

Environment: angular 18 + scheduler pro 5.6.11

The app crashes if you enable both features and create an event with postamble or preamble.

Console error

zone.js:1043 Unhandled Promise rejection: Cannot read properties of undefined (reading 'getTime') ; Zone: <root> ; Task: Promise.then ; Value: 
TypeError: Cannot read properties of undefined (reading 'getTime')
    at getStartEnd (HorizontalRendering.js:40:36)
    at ProHorizontalRendering.calculateMS (HorizontalRendering.js:852:19)
    at ProHorizontalRendering.setupRenderData (HorizontalRendering.js:908:716)
    at ProHorizontalRendering.getTimeSpanRenderData (HorizontalRendering.js:1070:23)
    at ProHorizontalRendering.getTimeSpanRenderData (ProHorizontalRendering.js:35:24)
    at SchedulerPro.generateRenderData (SchedulerEventRendering.js:445:57)
    at HorizontalRendering.js:1081:36
    at Array.reduce (<anonymous>)
    at ProHorizontalRendering.layoutEvents (HorizontalRendering.js:1079:91)
    at ProHorizontalRendering.layoutResourceEvents (HorizontalRendering.js:1123:15)
    at ProHorizontalRendering.getResourceLayout (HorizontalRendering.js:1216:27)
    at ProHorizontalRendering.renderer (HorizontalRendering.js:1247:68)
    at TimeAxisColumn.defaultRenderer (TimeAxisColumn.js:229:31)
    at TimeAxisColumn.callback (Base.js:497:47)
    at Row.renderCell (Row.js:611:28)
 TypeError: Cannot read properties of undefined (reading 'getTime')
    at getStartEnd (http://localhost:4200/default-web_employee-app_src_app_service_core_index_ts.js:172975:36)
    at ProHorizontalRendering.calculateMS (http://localhost:4200/default-web_employee-app_src_app_service_core_index_ts.js:174015:19)
    at ProHorizontalRendering.setupRenderData (http://localhost:4200/default-web_employee-app_src_app_service_core_index_ts.js:174095:21)
    at ProHorizontalRendering.getTimeSpanRenderData (http://localhost:4200/default-web_employee-app_src_app_service_core_index_ts.js:174289:23)
    at ProHorizontalRendering.getTimeSpanRenderData (http://localhost:4200/default-web_employee-app_src_app_service_core_index_ts.js:190274:24)
    at SchedulerPro.generateRenderData (http://localhost:4200/default-web_employee-app_src_app_service_core_index_ts.js:167030:42)
    at http://localhost:4200/default-web_employee-app_src_app_service_core_index_ts.js:174307:38
    at Array.reduce (<anonymous>)
    at ProHorizontalRendering.layoutEvents (http://localhost:4200/default-web_employee-app_src_app_service_core_index_ts.js:174305:30)
    at ProHorizontalRendering.layoutResourceEvents (http://localhost:4200/default-web_employee-app_src_app_service_core_index_ts.js:174365:15)
    at ProHorizontalRendering.getResourceLayout (http://localhost:4200/default-web_employee-app_src_app_service_core_index_ts.js:174474:27)
    at ProHorizontalRendering.renderer (http://localhost:4200/default-web_employee-app_src_app_service_core_index_ts.js:174527:27)
    at TimeAxisColumn.defaultRenderer (http://localhost:4200/default-web_employee-app_src_app_service_core_index_ts.js:129808:31)
    at TimeAxisColumn.callback (http://localhost:4200/default-web_employee-app_src_app_service_core_index_ts.js:3495:47)
    at Row.renderCell (http://localhost:4200/default-web_employee-app_src_app_service_core_index_ts.js:117782:28)
matsbryntse commented 1 month ago

Do you expect the event buffer to be outside the tick width, or the full event + event buffer should fit in one tick size?

egorkel-altexsoft commented 1 month ago

Actually, I don't know how it should work ) We just disable eventBuffer for now because of the crash. Probably for consistency reasons, events should always have full tick width and event buffers should be outside the tick.