| Issue 2315: | beforeViewRender hook | |
| 1 person starred this issue and may be notified of changes. | Back to list |
(feature request)
Useful in my current project is to have a custom overall width per view, eg 'agendaDay'.
We've required full width month and agendaWeek views and then reduced width agendaDay, creating space in the page for further event details not in an overlay/modal.
Here's how I accomplished this with one line of code in fullcalendar.js
[code]
function setSize() { // assumes elementVisible
if (suggestedViewHeight === undefined) {
calcSize(); // for first time
// NOTE: we don't want to recalculate on every renderView because
// it could result in oscillating heights due to scrollbars.
}
currentView.opt('setCalendarContainerWidth') &&
currentView.opt('setCalendarContainerWidth')(element, currentView);
ignoreWindowResize++;
currentView.setHeight(suggestedViewHeight);
currentView.setWidth(content.width());
ignoreWindowResize--;
elementOuterWidth = element.outerWidth();
}
[/code]
The setCalendarContainerWidth callback then sets a width per-view on the element (could have a parent of element)
A more general name of the option might be onBeforeViewLayout.
Aug 21, 2015
Discussion for this issue has moved to the following URL: https://github.com/fullcalendar/fullcalendar/issues/2580 This is because Google Code is shutting down. Apologies if you are being pestered with these notifications. This is a one-time event. Happy coding, Adam
Status:
ExportedToGithub
|
|
| ► Sign in to add a comment |
Status: Accepted
Labels: Type-Feature