Our pure JavaScript Scheduler component


Post by lendhoven »

Hi,
I just experienced an issue with the latest Bryntum Scheduler version 3.0.1 where my "columnLinesFor" setting used in my custom Preset only appears to be used on initialization with this Preset, but not when switching to this specific Preset at a later time.
The issue can also be reproduced easily in the "Configuration" example: https://www.bryntum.com/examples/scheduler/configuration/
by adding to the registerPreset() of "dayNightShift" the line "columnLinesFor : 0,".
When you add this line, the visualization updates itself and the lines are no longer drawn as in the basic example, but when switching to another Preset and back to this Preset, the lines are back to the default setup and seem to ignore my Preset setting.

When debugging version 3.0.1 of the Bryntum Scheduler, I noticed the following block of code which I think contains the source of the issue in the setViewPreset() function:
me.timeAxisViewModel.reconfigure({
    viewPreset : me.viewPreset,
    headers    : preset.headers,

    // This was hardcoded to 'bottom', so is now length - 1.
    // Is this correct @mats?
    columnLinesFor      : preset.headers.length - 1,
    // TODO: PORT rowHeightHorizontal??
    rowHeightHorizontal : me.readRowHeightFromPreset ? preset.rowHeight : me.rowHeight,
    tickSize            : isHorizontal ? preset.tickWidth : preset.tickHeight || preset.tickWidth || 60
});
where I would expect the "columnLinesFor" line to use the preset.columnLinesFor setting (if defined) instead of overwriting it always to a default.

Please let me know if my assumption is correct and if it is, if this can be fixed.
Thanks in advance!

Post by pmiklashevich »

Yes, you're right in your assumption! Thanks for the report! We'll get it fixed for the next patch release: https://github.com/bryntum/support/issues/226

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply