@syncfusion/ej2-schedule 20.4.38 → 20.4.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +1 -1
- package/dist/ej2-schedule.min.js +2 -2
- package/dist/ej2-schedule.umd.min.js +2 -2
- package/dist/ej2-schedule.umd.min.js.map +1 -1
- package/dist/es6/ej2-schedule.es2015.js +44 -23
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +44 -23
- package/dist/es6/ej2-schedule.es5.js.map +1 -1
- package/dist/global/ej2-schedule.min.js +2 -2
- package/dist/global/ej2-schedule.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +16 -16
- package/src/schedule/actions/drag.js +30 -21
- package/src/schedule/actions/resize.js +14 -2
|
@@ -19864,8 +19864,17 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
|
|
|
19864
19864
|
return;
|
|
19865
19865
|
}
|
|
19866
19866
|
var pages = this.getPageCoordinates(e);
|
|
19867
|
-
this.
|
|
19868
|
-
|
|
19867
|
+
if (this.parent.currentView === 'Month' || this.parent.currentView === 'TimelineYear') {
|
|
19868
|
+
var doc = document.documentElement;
|
|
19869
|
+
var left = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);
|
|
19870
|
+
var top_1 = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);
|
|
19871
|
+
this.actionObj.pageX = pages.pageX - left;
|
|
19872
|
+
this.actionObj.pageY = pages.pageY - top_1;
|
|
19873
|
+
}
|
|
19874
|
+
else {
|
|
19875
|
+
this.actionObj.pageX = pages.pageX;
|
|
19876
|
+
this.actionObj.pageY = pages.pageY;
|
|
19877
|
+
}
|
|
19869
19878
|
this.updateScrollPosition(e);
|
|
19870
19879
|
this.updateResizingDirection(e);
|
|
19871
19880
|
var eventObj = extend({}, this.actionObj.event, null, true);
|
|
@@ -20210,6 +20219,9 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
|
|
|
20210
20219
|
clnTop = isTop ? Math.floor(clnTop / slotInterval) * slotInterval : clnTop;
|
|
20211
20220
|
clnHeight = clnTop + clnHeight >= viewElement.scrollHeight ? viewElement.scrollHeight - clnTop :
|
|
20212
20221
|
Math.ceil(clnHeight / slotInterval) * slotInterval;
|
|
20222
|
+
if (!isTop && this.actionObj.clone.offsetTop + clnHeight >= this.parent.getContentTable().offsetHeight) {
|
|
20223
|
+
clnHeight = this.parent.getContentTable().offsetHeight - this.actionObj.clone.offsetTop;
|
|
20224
|
+
}
|
|
20213
20225
|
var styles = {
|
|
20214
20226
|
height: formatUnit(clnHeight < this.actionObj.cellHeight ? Math.floor(clnHeight / slotInterval) * slotInterval : clnHeight),
|
|
20215
20227
|
top: formatUnit((clnHeight < this.actionObj.cellHeight && isTop) ? Math.ceil(clnTop / slotInterval) * slotInterval : clnTop),
|
|
@@ -21854,7 +21866,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21854
21866
|
getUniversalTime(eventObj[this.parent.eventFields.startTime]);
|
|
21855
21867
|
var offsetLeft = this.parent.enableRtl ? Math.abs(this.actionObj.clone.offsetLeft) - this.actionObj.clone.offsetWidth :
|
|
21856
21868
|
parseInt(this.actionObj.clone.style.left, 10);
|
|
21857
|
-
offsetLeft = Math.floor(offsetLeft / this.actionObj.cellWidth) * this.actionObj.cellWidth;
|
|
21869
|
+
offsetLeft = Math.floor(offsetLeft / Math.trunc(this.actionObj.cellWidth)) * this.actionObj.cellWidth;
|
|
21858
21870
|
var rightOffset;
|
|
21859
21871
|
if (this.parent.enableRtl) {
|
|
21860
21872
|
rightOffset = Math.abs(parseInt(this.actionObj.clone.style.right, 10));
|
|
@@ -21940,25 +21952,27 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21940
21952
|
eventsData = this.updatedData;
|
|
21941
21953
|
}
|
|
21942
21954
|
for (var dataIndex = 0; dataIndex < eventsData.length; dataIndex++) {
|
|
21943
|
-
var events_2 = this.timelineEventModule.splitEvent(eventsData[parseInt(dataIndex.toString(), 10)], this.timelineEventModule.dateRender);
|
|
21944
|
-
var eventData = events_2[0].data;
|
|
21945
|
-
var startTime = this.timelineEventModule.getStartTime(events_2[0], eventData);
|
|
21946
|
-
var endTime = this.timelineEventModule.getEndTime(events_2[0], eventData);
|
|
21947
|
-
// eslint-disable-next-line max-len
|
|
21948
|
-
var width = this.timelineEventModule.getEventWidth(startTime, endTime, eventObj[this.parent.eventFields.isAllDay], eventData.count);
|
|
21949
|
-
// eslint-disable-next-line max-len
|
|
21950
|
-
var day = this.parent.getIndexOfDate(this.timelineEventModule.dateRender, resetTime(new Date(startTime.getTime())));
|
|
21951
|
-
day = day < 0 ? 0 : day;
|
|
21952
|
-
var left = this.timelineEventModule.getPosition(startTime, endTime, eventObj[this.parent.eventFields.isAllDay], day);
|
|
21953
21955
|
var cloneElement = this.multiData.length > 0 ? this.actionObj.cloneElement[parseInt(dataIndex.toString(), 10)] : this.actionObj.clone;
|
|
21954
|
-
if (this.parent.
|
|
21955
|
-
|
|
21956
|
-
|
|
21957
|
-
|
|
21958
|
-
|
|
21959
|
-
|
|
21960
|
-
|
|
21961
|
-
|
|
21956
|
+
if (isNullOrUndefined(this.parent.eventDragArea)) {
|
|
21957
|
+
var events_2 = this.timelineEventModule.splitEvent(eventsData[parseInt(dataIndex.toString(), 10)], this.timelineEventModule.dateRender);
|
|
21958
|
+
var eventData = events_2[0].data;
|
|
21959
|
+
var startTime = this.timelineEventModule.getStartTime(events_2[0], eventData);
|
|
21960
|
+
var endTime = this.timelineEventModule.getEndTime(events_2[0], eventData);
|
|
21961
|
+
// eslint-disable-next-line max-len
|
|
21962
|
+
var width = this.timelineEventModule.getEventWidth(startTime, endTime, eventObj[this.parent.eventFields.isAllDay], eventData.count);
|
|
21963
|
+
// eslint-disable-next-line max-len
|
|
21964
|
+
var day = this.parent.getIndexOfDate(this.timelineEventModule.dateRender, resetTime(new Date(startTime.getTime())));
|
|
21965
|
+
day = day < 0 ? 0 : day;
|
|
21966
|
+
var left = this.timelineEventModule.getPosition(startTime, endTime, eventObj[this.parent.eventFields.isAllDay], day);
|
|
21967
|
+
if (this.parent.enableRtl) {
|
|
21968
|
+
cloneElement.style.right = formatUnit(left);
|
|
21969
|
+
}
|
|
21970
|
+
else {
|
|
21971
|
+
cloneElement.style.left = formatUnit(left);
|
|
21972
|
+
}
|
|
21973
|
+
if (!this.isMorePopupOpened) {
|
|
21974
|
+
cloneElement.style.width = formatUnit(width);
|
|
21975
|
+
}
|
|
21962
21976
|
}
|
|
21963
21977
|
if (this.parent.activeViewOptions.group.resources.length > 0) {
|
|
21964
21978
|
this.calculateResourceGroupingPosition(e, cloneElement);
|
|
@@ -21985,7 +21999,9 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21985
21999
|
rightOffset = (viewEle.scrollLeft - viewEle.scrollWidth);
|
|
21986
22000
|
}
|
|
21987
22001
|
}
|
|
21988
|
-
this.
|
|
22002
|
+
if (isNullOrUndefined(this.parent.eventDragArea)) {
|
|
22003
|
+
this.actionObj.clone.style.left = formatUnit(rightOffset);
|
|
22004
|
+
}
|
|
21989
22005
|
}
|
|
21990
22006
|
else {
|
|
21991
22007
|
if (this.scrollEdges.left) {
|
|
@@ -22002,7 +22018,9 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
22002
22018
|
this.actionObj.clone.offsetWidth) + (this.actionObj.clone.offsetWidth - this.widthUptoCursorPoint);
|
|
22003
22019
|
}
|
|
22004
22020
|
offsetLeft = offsetLeft < 0 ? 0 : offsetLeft;
|
|
22005
|
-
this.
|
|
22021
|
+
if (isNullOrUndefined(this.parent.eventDragArea)) {
|
|
22022
|
+
this.actionObj.clone.style.left = formatUnit(offsetLeft);
|
|
22023
|
+
}
|
|
22006
22024
|
}
|
|
22007
22025
|
}
|
|
22008
22026
|
return offsetLeft;
|
|
@@ -22080,6 +22098,9 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
22080
22098
|
var td = closest(this.actionObj.target, 'td');
|
|
22081
22099
|
this.actionObj.groupIndex = (td && !isNaN(parseInt(td.getAttribute('data-group-index'), 10)))
|
|
22082
22100
|
? parseInt(td.getAttribute('data-group-index'), 10) : this.actionObj.groupIndex;
|
|
22101
|
+
if (!isNullOrUndefined(this.parent.eventDragArea)) {
|
|
22102
|
+
return;
|
|
22103
|
+
}
|
|
22083
22104
|
var top = trCollection[parseInt(rowIndex.toString(), 10)].getBoundingClientRect().height * rowIndex;
|
|
22084
22105
|
if (this.parent.rowAutoHeight) {
|
|
22085
22106
|
var cursorElement = this.getCursorElement(e);
|