DhtmlxScheduler lightbox (details box) only centered on docu

Hello,



First of all, thank you for your great work :slight_smile:



My question is : I’m perfectly using the scheduler component. However just imagine my case: the scheduler component is located at the bottom of the body section which is big enough to make my browser scroll.



When I dbl click on the scheduler to edit details for an event, the lightbox displays on the center of the page, so it scrolls up and I cannot then see the scheduler.



When looking into the dhtmlxsheduler_debug.js, I found this function with hard-coded top/left position for the lightbox:





scheduler.showLightbox=function(id){

    if (!id) return;

    this.show_cover();

    var box = this._get_lightbox();

    box.style.display=“block”;

    box.style.top=Math.round((document.body.offsetHeight-box.offsetHeight)/2)+“px”;

    box.style.left=Math.round((document.body.offsetWidth-box.offsetWidth)/2)+“px”;    

    

    this._fill_lightbox(id,box);

}





Is there an other way to set those parameters (Math.round((document.body.offsetHeight-box.offsetHeight)/2)+“px”) or should I change directly the source code with the values I would like to use ?



Thanks a lot,



Julien.

Is there an other way to set those parameters
Unfortunately there is no other way to define lightbox position.

We will check how behavior can be improved in next version, in meantime it will be simpler to change logic directly in source code. ( you can just copy a code of showLightbox on your html page, and rewrite it there - in such case you can use not modified source code )

Many thanks.