Hi I use scheduler 5.3.1 with angular 14
I get a problem when I am trying change zoom in rtl mode with "zoomToLevel()"
I am trying on change the zoom to show specific date in the same offset(specific date that always in the view in specific place in the scheduler).
In "LTR" It works fine but in "RTL" I lose the date.
Explain:
I use the "zoomToLevel()" with the zoomDate and zoomPosition properties.
In the zoom date I put the date that I want to save in the view and the offset I calculate like this:
calculateOfsset(scheduler) {
// Get date X.
const x = scheduler.getCoordinateFromDate(this.timeRangeDate);
// Calculate new click offset 0-1.
let clickOffset: number = x / scheduler.timelineScroller.scrollWidth;
if (this.direction === 'rtl') {
clickOffset = 1 - clickOffset;
}
// Calculate offset in px.
this.clickClientOffset = clickOffset * scheduler.timelineScroller.scrollWidth;
}
I create a demo for you for show the problem.
Reproduce:
1) I add some time range that need be always in the same place after zoom.
2) on first load you start as "LTR" mode.
3) Click on the "ZOOM+/ZOOM-" You will see that the time range stay in the same place.
4) I add button that change the scheduler direction(Click).
5) Play again with the "ZOOM+/ZOOM-" you will see that it is broken.
How can I solve this issue?