richardtop / CalendarKit

📅 Calendar for Apple platforms in Swift
https://www.youtube.com/watch?v=cJ63-_z1qg8
MIT License
2.54k stars 343 forks source link

More complex eventGap behavior #288

Closed RareScrap closed 3 years ago

RareScrap commented 4 years ago

New Issue Checklist

Issue Description

We have the ability to set the gasp for EventView (via TimelineStyle), which is applied to the right and bottom edges of the view. However, it makes sense to gap the bottom edge only if the view is adjacent to other views. Otherwise, we distort the visual representation of the end time of the event.

In the current version of the library, access is always applied if specified (The difference in accessibility can be seen when switching views to edit mode):

I suggest using bottom indentation only if the end time of one event is the start time of another (or with a slight difference).

On the gif, you can see how the bottom gap is applied only if there is another view below the view:

It seems to me that such a feature will perfectly complement the CalendarKit. I propose to discuss this.

richardtop commented 4 years ago

Hi, thanks for reporting this issue. It's definitely a bug, as eventGap should be in effect only when the events are touching each other. What you've described is an expected behavior, so please go ahead and implement it.

richardtop commented 4 years ago

Does this solve your issue? https://github.com/richardtop/CalendarKit/pull/290