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

Day view ALIGN_LEFT stategy doesn't work with intersecting entries #85

Closed
ftrela opened this issue Apr 16, 2020 · 7 comments
Closed

Day view ALIGN_LEFT stategy doesn't work with intersecting entries #85

ftrela opened this issue Apr 16, 2020 · 7 comments

Comments

@ftrela
Copy link

ftrela commented Apr 16, 2020

Inside the entry view factory the Entry1 entry view has set specific pref width and alignment strategy to ALIGN_LEFT:

entryView.setPrefWidth(20);
entryView.setAlignmentStrategy(EntryViewBase.AlignmentStrategy.ALIGN_LEFT);

The Entry2 entry has default alignment strategy EntryViewBase.AlignmentStrategy.FILL

When the Entry1 and Entry2 intersect and the Entry1 start time is later than the Entry2 start time, then the Entry1 is no longer on the left side of the day view. Please look at the image below:
CalendarFX_align_left_strategy

I would expect that after setting the EntryViewBase.AlignmentStrategy.ALIGN_LEFT, the entry view always shows up on the left side of the day view. Is it possible?

@ftrela ftrela changed the title Day view alignment stategy with intersecting entries Day view ALIGN_LEFT stategy doesn't work with intersecting entries Apr 16, 2020
@dlemmermann
Copy link
Collaborator

Unfortunately not. The algorithm that deals with overlapping entries does not take the alignment property into consideration.

@dlemmermann
Copy link
Collaborator

Could it be that all you need is a way to "disable" the resolution of overlapping entries and have more manual control? Same for issue #86 ?

@ftrela
Copy link
Author

ftrela commented Apr 23, 2020

I think it should be ok. As I understand, you want to provide an additional API for this manual control. Could you roughly say, what will this API look like? And what about drag-and-drop visualization, will it follow the rules defined by this new API?

@dlemmermann
Copy link
Collaborator

On DayViewBase I would have a method like "setEnableOverlappingEntries(true)". And yes, while dragging an entry that setting would also be applied.

@dlemmermann
Copy link
Collaborator

I have added the property autoLayout to DayViewBase, which means it is also available for the ResourceCalendarView. There the value is set to false, so CalendarFX will no longer try to place entries with overlapping time intervals in separate columns. Please let me know if this solves this issue.

@ftrela
Copy link
Author

ftrela commented May 6, 2020

As I noticed while commenting the other issue (#86), the autoLayout property is no longer there - and there were also some changes made in the algorithm that deals with overlapping entries. Could you consider also placing the entry on the left, the center, or the middle of the entry view and not a given column in which the entry has been placed (when the com.calendarfx.view.EntryViewBase#setAlignmentStrategy has been used)? It looks like a good thing for the CalendarFX anyways since from the point of view of usability it would look better (I can imagine that someone wants to freeze a narrow calendar entry at a certain position of the day view for a specific kind of activity so that he would remember it better) - and also from the point of view of the API, entryView.setAlignmentStrategy(AlignmentStrategy.ALIGN_LEFT) suggests that the entry will be located on the left side of the view.
That would be a big deal for us since in other scenario we would have to re-write the already existing overlapping algorithm ourselves. What do you think?

@ftrela
Copy link
Author

ftrela commented May 15, 2020

As I wrote in the #86 issue, I came up with another solution for this problem, so I'm closing this issue.

@ftrela ftrela closed this as completed May 15, 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

No branches or pull requests

2 participants