Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix height calculation bug #584

Merged
merged 1 commit into from Jan 31, 2020
Merged

fix height calculation bug #584

merged 1 commit into from Jan 31, 2020

Conversation

xiaoweiwu
Copy link

No description provided.

@elsesiy
Copy link
Member

elsesiy commented Dec 27, 2019

@xiaoweiwu Thanks for your first contribution. However, I don't understand what your issue is and why this is supposed to fix it. From what I can see you'd be ignoring the number of weeks in a given month when rendering the calendar view which seems odd. Please elaborate on this submission, thanks!

@xiaoweiwu
Copy link
Author

@xiaoweiwu Thanks for your first contribution. However, I don't understand what your issue is and why this is supposed to fix it. From what I can see you'd be ignoring the number of weeks in a given month when rendering the calendar view which seems odd. Please elaborate on this submission, thanks!

@elsesiy
height = (maxHeight / countOfWeeks) - (vSpace * countOfWeeks)
height of weekViewSize is incorrect when vSpace >0

fix:
height = (maxHeight-countOfWeeks * vSpace ) / countOfWeeks
=>
height = maxHeight / countOfWeeks - vSpace

@elsesiy elsesiy merged commit 25426c1 into CVCalendar:master Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants