Skip to content

Commit c1c165d

Browse files
author
Matt Lewis
committed
fix(dayView): allow all events to be clicked
Closes #179
1 parent f752d2c commit c1c165d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

scss/day-view.scss

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
}
4747

4848
.cal-event {
49+
position: absolute;
4950
border: solid 1px;
5051
padding: 5px;
5152
font-size: 12px;

test/calendarDayView.component.spec.ts

+3
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ describe('CalendarDayViewComponent component', () => {
275275
fixture.detectChanges();
276276
document.body.appendChild(fixture.nativeElement);
277277
const event: HTMLElement = fixture.nativeElement.querySelector('.cal-event-container');
278+
event.querySelector('.cal-event')['style'].position = 'inherit'; // hacky fix
278279
const rect: ClientRect = event.getBoundingClientRect();
279280
let resizeEvent: CalendarEventTimesChangedEvent;
280281
fixture.componentInstance.eventTimesChanged.subscribe(event => {
@@ -312,6 +313,7 @@ describe('CalendarDayViewComponent component', () => {
312313
fixture.detectChanges();
313314
document.body.appendChild(fixture.nativeElement);
314315
const event: HTMLElement = fixture.nativeElement.querySelector('.cal-event-container');
316+
event.querySelector('.cal-event')['style'].position = 'inherit'; // hacky fix
315317
const rect: ClientRect = event.getBoundingClientRect();
316318
let resizeEvent: CalendarEventTimesChangedEvent;
317319
fixture.componentInstance.eventTimesChanged.subscribe(event => {
@@ -469,6 +471,7 @@ describe('CalendarDayViewComponent component', () => {
469471
fixture.detectChanges();
470472
document.body.appendChild(fixture.nativeElement);
471473
const event: HTMLElement = fixture.nativeElement.querySelector('.cal-event-container');
474+
event.querySelector('.cal-event')['style'].position = 'inherit'; // hacky fix
472475
const rect: ClientRect = event.getBoundingClientRect();
473476
triggerDomEvent('mousedown', document.body, {clientY: rect.top, clientX: rect.left + 10});
474477
fixture.detectChanges();

0 commit comments

Comments
 (0)