You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that using beforeViewRender on mwl-calendar-week-view, I can apply styling to "disable" specific segments. But, then I drag an event on the week view, the styling goes away.
When I do the same thing on mwl-calendar-day-view, the styling does not go away.
I then started looking at the differences between day and week view. I noticed this line in week view:
[dragOverClass]="!dragActive || !snapDraggedEvents ? 'cal-drag-over' : null"
And in Day view it looks like:
dragOverClass="cal-drag-over"
So I thought, what if I set snapDraggedEvents to false, would my styling stick? And voila, it does! (As shown in the gif below)
I just have a couple of questions, what is the purpose of only applying the cal-drag-over class when not snapDraggedEvents or not drag active? Why is it applied in week view but not day view?
For now I am setting snapDraggedEvents to false in my project to avoid this, but would like to eventually have the snapping effect as well. Maybe instead of "null" we can apply segment.cssClass?
Hope to hear from you soon.
Minimal reproduction of the problem with instructions
Browser name and version: Google Chrome Version 72.0.3626.119 (Official Build) (64-bit)
The text was updated successfully, but these errors were encountered:
jcjobin
changed the title
snapDraggedEvents not allowing custom segment styling to stick when dragging
snapDraggedEvents not allowing custom segment styling to stick when dragging on Week View
Mar 1, 2019
Describe the bug
I noticed that using beforeViewRender on mwl-calendar-week-view, I can apply styling to "disable" specific segments. But, then I drag an event on the week view, the styling goes away.
When I do the same thing on mwl-calendar-day-view, the styling does not go away.
I then started looking at the differences between day and week view. I noticed this line in week view:
[dragOverClass]="!dragActive || !snapDraggedEvents ? 'cal-drag-over' : null"
And in Day view it looks like:
dragOverClass="cal-drag-over"
So I thought, what if I set snapDraggedEvents to false, would my styling stick? And voila, it does! (As shown in the gif below)
I just have a couple of questions, what is the purpose of only applying the cal-drag-over class when not snapDraggedEvents or not drag active? Why is it applied in week view but not day view?
For now I am setting snapDraggedEvents to false in my project to avoid this, but would like to eventually have the snapping effect as well. Maybe instead of "null" we can apply segment.cssClass?
Hope to hear from you soon.
Minimal reproduction of the problem with instructions
Here is my stackblitz link: https://stackblitz.com/edit/angular-rxyzbe?file=demo%2Ftemplate.html
Follow same procedure as this gif:
Screenshots
Versions
Taken from stackblitz
@angular/core
: 6.1.10angular-calendar
: 0.26.6The text was updated successfully, but these errors were encountered: