Is there a way to adjust the size of the Lightbox popup to the bottom right or any other position? Or is there another way to dynamically adjust it based on the content?
Hello @Jonas1,
Currently, there is no built-in option to add “resizer” to the lightbox, but I already sent it to the dev team, and they will consider adding this functionality to future versions.
Technically, it should be possible by changing lightbox config based on event’s content using the onBeforeLightbox
event:
scheduler.attachEvent("onBeforeLightbox", function (id){
let ev = scheduler.getEvent(id).text
let length = ev.length;
if(length > 10){
scheduler.config.lightbox.sections=[
{ name:"description", height:1000, type:"textarea", map_to:"text", focus:true},
{ name:"time", height:1000, type:"time", map_to:"auto"}
];
} else {
scheduler.config.lightbox.sections=[
{ name:"description", height:50, type:"textarea", map_to:"text", focus:true},
{ name:"time", height:72, type:"time", map_to:"auto"}
];
}
//any custom logic here
return true;
});
Unfortunately, currently it doesn’t work due to an internal scheduler bug. The dev team will try to fix it ASAP.
Kind regards,
1 Like