@syncfusion/ej2-schedule 20.4.40 → 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 +8 -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 +17 -15
- package/src/schedule/actions/drag.js +30 -21
- package/src/schedule/actions/resize.js +14 -2
- package/styles/bootstrap4.css +1 -1
- package/styles/schedule/bootstrap4.css +1 -1
|
@@ -19186,8 +19186,17 @@ class Resize extends ActionBase {
|
|
|
19186
19186
|
return;
|
|
19187
19187
|
}
|
|
19188
19188
|
const pages = this.getPageCoordinates(e);
|
|
19189
|
-
this.
|
|
19190
|
-
|
|
19189
|
+
if (this.parent.currentView === 'Month' || this.parent.currentView === 'TimelineYear') {
|
|
19190
|
+
const doc = document.documentElement;
|
|
19191
|
+
const left = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);
|
|
19192
|
+
const top = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);
|
|
19193
|
+
this.actionObj.pageX = pages.pageX - left;
|
|
19194
|
+
this.actionObj.pageY = pages.pageY - top;
|
|
19195
|
+
}
|
|
19196
|
+
else {
|
|
19197
|
+
this.actionObj.pageX = pages.pageX;
|
|
19198
|
+
this.actionObj.pageY = pages.pageY;
|
|
19199
|
+
}
|
|
19191
19200
|
this.updateScrollPosition(e);
|
|
19192
19201
|
this.updateResizingDirection(e);
|
|
19193
19202
|
const eventObj = extend({}, this.actionObj.event, null, true);
|
|
@@ -19525,6 +19534,9 @@ class Resize extends ActionBase {
|
|
|
19525
19534
|
clnTop = isTop ? Math.floor(clnTop / slotInterval) * slotInterval : clnTop;
|
|
19526
19535
|
clnHeight = clnTop + clnHeight >= viewElement.scrollHeight ? viewElement.scrollHeight - clnTop :
|
|
19527
19536
|
Math.ceil(clnHeight / slotInterval) * slotInterval;
|
|
19537
|
+
if (!isTop && this.actionObj.clone.offsetTop + clnHeight >= this.parent.getContentTable().offsetHeight) {
|
|
19538
|
+
clnHeight = this.parent.getContentTable().offsetHeight - this.actionObj.clone.offsetTop;
|
|
19539
|
+
}
|
|
19528
19540
|
const styles = {
|
|
19529
19541
|
height: formatUnit(clnHeight < this.actionObj.cellHeight ? Math.floor(clnHeight / slotInterval) * slotInterval : clnHeight),
|
|
19530
19542
|
top: formatUnit((clnHeight < this.actionObj.cellHeight && isTop) ? Math.ceil(clnTop / slotInterval) * slotInterval : clnTop),
|
|
@@ -21109,7 +21121,7 @@ class DragAndDrop extends ActionBase {
|
|
|
21109
21121
|
getUniversalTime(eventObj[this.parent.eventFields.startTime]);
|
|
21110
21122
|
let offsetLeft = this.parent.enableRtl ? Math.abs(this.actionObj.clone.offsetLeft) - this.actionObj.clone.offsetWidth :
|
|
21111
21123
|
parseInt(this.actionObj.clone.style.left, 10);
|
|
21112
|
-
offsetLeft = Math.floor(offsetLeft / this.actionObj.cellWidth) * this.actionObj.cellWidth;
|
|
21124
|
+
offsetLeft = Math.floor(offsetLeft / Math.trunc(this.actionObj.cellWidth)) * this.actionObj.cellWidth;
|
|
21113
21125
|
let rightOffset;
|
|
21114
21126
|
if (this.parent.enableRtl) {
|
|
21115
21127
|
rightOffset = Math.abs(parseInt(this.actionObj.clone.style.right, 10));
|
|
@@ -21195,25 +21207,27 @@ class DragAndDrop extends ActionBase {
|
|
|
21195
21207
|
eventsData = this.updatedData;
|
|
21196
21208
|
}
|
|
21197
21209
|
for (let dataIndex = 0; dataIndex < eventsData.length; dataIndex++) {
|
|
21198
|
-
const events = this.timelineEventModule.splitEvent(eventsData[parseInt(dataIndex.toString(), 10)], this.timelineEventModule.dateRender);
|
|
21199
|
-
const eventData = events[0].data;
|
|
21200
|
-
const startTime = this.timelineEventModule.getStartTime(events[0], eventData);
|
|
21201
|
-
const endTime = this.timelineEventModule.getEndTime(events[0], eventData);
|
|
21202
|
-
// eslint-disable-next-line max-len
|
|
21203
|
-
const width = this.timelineEventModule.getEventWidth(startTime, endTime, eventObj[this.parent.eventFields.isAllDay], eventData.count);
|
|
21204
|
-
// eslint-disable-next-line max-len
|
|
21205
|
-
let day = this.parent.getIndexOfDate(this.timelineEventModule.dateRender, resetTime(new Date(startTime.getTime())));
|
|
21206
|
-
day = day < 0 ? 0 : day;
|
|
21207
|
-
const left = this.timelineEventModule.getPosition(startTime, endTime, eventObj[this.parent.eventFields.isAllDay], day);
|
|
21208
21210
|
const cloneElement = this.multiData.length > 0 ? this.actionObj.cloneElement[parseInt(dataIndex.toString(), 10)] : this.actionObj.clone;
|
|
21209
|
-
if (this.parent.
|
|
21210
|
-
|
|
21211
|
-
|
|
21212
|
-
|
|
21213
|
-
|
|
21214
|
-
|
|
21215
|
-
|
|
21216
|
-
|
|
21211
|
+
if (isNullOrUndefined(this.parent.eventDragArea)) {
|
|
21212
|
+
const events = this.timelineEventModule.splitEvent(eventsData[parseInt(dataIndex.toString(), 10)], this.timelineEventModule.dateRender);
|
|
21213
|
+
const eventData = events[0].data;
|
|
21214
|
+
const startTime = this.timelineEventModule.getStartTime(events[0], eventData);
|
|
21215
|
+
const endTime = this.timelineEventModule.getEndTime(events[0], eventData);
|
|
21216
|
+
// eslint-disable-next-line max-len
|
|
21217
|
+
const width = this.timelineEventModule.getEventWidth(startTime, endTime, eventObj[this.parent.eventFields.isAllDay], eventData.count);
|
|
21218
|
+
// eslint-disable-next-line max-len
|
|
21219
|
+
let day = this.parent.getIndexOfDate(this.timelineEventModule.dateRender, resetTime(new Date(startTime.getTime())));
|
|
21220
|
+
day = day < 0 ? 0 : day;
|
|
21221
|
+
const left = this.timelineEventModule.getPosition(startTime, endTime, eventObj[this.parent.eventFields.isAllDay], day);
|
|
21222
|
+
if (this.parent.enableRtl) {
|
|
21223
|
+
cloneElement.style.right = formatUnit(left);
|
|
21224
|
+
}
|
|
21225
|
+
else {
|
|
21226
|
+
cloneElement.style.left = formatUnit(left);
|
|
21227
|
+
}
|
|
21228
|
+
if (!this.isMorePopupOpened) {
|
|
21229
|
+
cloneElement.style.width = formatUnit(width);
|
|
21230
|
+
}
|
|
21217
21231
|
}
|
|
21218
21232
|
if (this.parent.activeViewOptions.group.resources.length > 0) {
|
|
21219
21233
|
this.calculateResourceGroupingPosition(e, cloneElement);
|
|
@@ -21240,7 +21254,9 @@ class DragAndDrop extends ActionBase {
|
|
|
21240
21254
|
rightOffset = (viewEle.scrollLeft - viewEle.scrollWidth);
|
|
21241
21255
|
}
|
|
21242
21256
|
}
|
|
21243
|
-
this.
|
|
21257
|
+
if (isNullOrUndefined(this.parent.eventDragArea)) {
|
|
21258
|
+
this.actionObj.clone.style.left = formatUnit(rightOffset);
|
|
21259
|
+
}
|
|
21244
21260
|
}
|
|
21245
21261
|
else {
|
|
21246
21262
|
if (this.scrollEdges.left) {
|
|
@@ -21257,7 +21273,9 @@ class DragAndDrop extends ActionBase {
|
|
|
21257
21273
|
this.actionObj.clone.offsetWidth) + (this.actionObj.clone.offsetWidth - this.widthUptoCursorPoint);
|
|
21258
21274
|
}
|
|
21259
21275
|
offsetLeft = offsetLeft < 0 ? 0 : offsetLeft;
|
|
21260
|
-
this.
|
|
21276
|
+
if (isNullOrUndefined(this.parent.eventDragArea)) {
|
|
21277
|
+
this.actionObj.clone.style.left = formatUnit(offsetLeft);
|
|
21278
|
+
}
|
|
21261
21279
|
}
|
|
21262
21280
|
}
|
|
21263
21281
|
return offsetLeft;
|
|
@@ -21335,6 +21353,9 @@ class DragAndDrop extends ActionBase {
|
|
|
21335
21353
|
const td = closest(this.actionObj.target, 'td');
|
|
21336
21354
|
this.actionObj.groupIndex = (td && !isNaN(parseInt(td.getAttribute('data-group-index'), 10)))
|
|
21337
21355
|
? parseInt(td.getAttribute('data-group-index'), 10) : this.actionObj.groupIndex;
|
|
21356
|
+
if (!isNullOrUndefined(this.parent.eventDragArea)) {
|
|
21357
|
+
return;
|
|
21358
|
+
}
|
|
21338
21359
|
let top = trCollection[parseInt(rowIndex.toString(), 10)].getBoundingClientRect().height * rowIndex;
|
|
21339
21360
|
if (this.parent.rowAutoHeight) {
|
|
21340
21361
|
const cursorElement = this.getCursorElement(e);
|