search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Fixed height for row (css override) ?

Asked by Adrian-Ionel Corduneanu
9 years ago.

"Hi,

with Daypilot Scheduler < 7.0 is it possible to adjust the row height manually (maybe with some css overrides) to a fixed height ?

In my specific case I need to limit the rows displayed for a resource to exactly one row not more, also if events are overlapping.
I already found out how to arrange overlapping events into one single row by using some javascript after the calendar has been rendered but i could not find out how to fix the row height which stays on 2 or more rows after that.

Thank you !"

Sorry that I add my answer like this but there is a way to do what you want.
in scheduler.js you need to add few lines of code:
* in the _drawEvent function, after checking if dp is different of cssOnly add next lines:
if (data.part.line > 0&&this.displayeventsincascade)
{
div.style.top=(rowTop+(data.part.line * 6))+'px'; -> 6 is my event overlapping top
div.style.opacity = (1 - data.part.line * 0.15); -> 0.15 my opacity loose for each lv
div.style.filter = "alpha(opacity=" +Number((1 - data.part.line * 0.15) * 10) + ")"; -> IE pollyfill for opacity
}

* in _loadResourceChildren function, internal row.height add next lines instead the existing return
if (!calendar.displayeventsincascade)
{
return (height > this.MinHeight) ? height : this.MinHeight; //this was the original line
}
else
{
return this.MinHeight;
}

* and on the scheduler property list from same file add next line
this.displayeventsincascade = true;

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.