Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
viewRender/beforeViewRender trigger #15
Hi, in a project I'm currently working on, we need to know when the calendar is going to be rendered. To do this, I needed to add this trigger. Would it be possible to have this merged upstream?
In case you're wondering, I need this for the following:
It adds a new background table to the calendar, which shows lines that indicate whether or not the slot is free / busy.
These lines need to be cleared upon switching to a new week, which is why I need the trigger.
Would the existing viewDisplay trigger be enough for you? It fires after the view has already been rendered (doesn't wait for events though), so it's not exactly what you want, but it'd probably look the same from the user's perspective. The clearing of the background you described doesn't seem like it would mind if the new cells represent different dates, since it would all happen instantly.
Is viewDisplay good enough?
added a commit
this pull request
Mar 4, 2013
I stumbled on a situation where I need to be able to cancel the rendering. Since some options can't be change dynamicaly (i.e. weekends), it was the only way I found to have the current calendar state before it rendered. It allows me be able to destroy it and rebuild the calendar with different options.
Ok, understood. Thinking out loud: Seems like we should have a new
Then, we should have another option called
No need for further code changes. I'll worry about this
I'm changing my mind about returning
Seems like canceling the display of the view should happen before the "rendering" phase is entered.
Regardless, you should be able to achieve what you want with these new options.