Skip to content

Commit 79fcefc

Browse files
committed
fix(week-view): fix dragging on last column when view fills the screen
Closes #871
1 parent 727d79a commit 79fcefc

File tree

1 file changed

+8
-8
lines changed
  • projects/angular-calendar/src/modules/common

1 file changed

+8
-8
lines changed

projects/angular-calendar/src/modules/common/util.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ export const validateEvents = (events: CalendarEvent[]) => {
1717

1818
export function isInside(outer: ClientRect, inner: ClientRect): boolean {
1919
return (
20-
Math.ceil(outer.left) <= Math.ceil(inner.left) &&
21-
Math.ceil(inner.left) <= Math.ceil(outer.right) &&
22-
Math.ceil(outer.left) <= Math.ceil(inner.right) &&
23-
Math.ceil(inner.right) <= Math.ceil(outer.right) &&
24-
Math.ceil(outer.top) <= Math.ceil(inner.top) &&
25-
Math.ceil(inner.top) <= Math.ceil(outer.bottom) &&
26-
Math.ceil(outer.top) <= Math.ceil(inner.bottom) &&
27-
Math.ceil(inner.bottom) <= Math.ceil(outer.bottom)
20+
Math.floor(outer.left) <= Math.ceil(inner.left) &&
21+
Math.floor(inner.left) <= Math.ceil(outer.right) &&
22+
Math.floor(outer.left) <= Math.ceil(inner.right) &&
23+
Math.floor(inner.right) <= Math.ceil(outer.right) &&
24+
Math.floor(outer.top) <= Math.ceil(inner.top) &&
25+
Math.floor(inner.top) <= Math.ceil(outer.bottom) &&
26+
Math.floor(outer.top) <= Math.ceil(inner.bottom) &&
27+
Math.floor(inner.bottom) <= Math.ceil(outer.bottom)
2828
);
2929
}
3030

0 commit comments

Comments
 (0)