angular-calendar
Version:
A calendar component that can display events on a month, week or day view
19 lines • 854 B
JavaScript
import { isInside } from './calendarUtils.provider';
export var CalendarDragHelper = (function () {
function CalendarDragHelper(dragContainerElement, draggableElement) {
this.dragContainerElement = dragContainerElement;
this.startPosition = draggableElement.getBoundingClientRect();
}
CalendarDragHelper.prototype.validateDrag = function (_a) {
var x = _a.x, y = _a.y;
var newRect = Object.assign({}, this.startPosition, {
left: this.startPosition.left + x,
right: this.startPosition.right + x,
top: this.startPosition.top + y,
bottom: this.startPosition.bottom + y
});
return isInside(this.dragContainerElement.getBoundingClientRect(), newRect);
};
return CalendarDragHelper;
}());
//# sourceMappingURL=calendarDragHelper.provider.js.map