@syncfusion/ej2-schedule 21.2.3 → 21.2.4
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 +7 -0
- 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 +32 -3
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +33 -3
- 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 -13
- package/src/schedule/actions/drag.js +5 -2
- package/src/schedule/event-renderer/timeline-view.d.ts +1 -0
- package/src/schedule/event-renderer/timeline-view.js +28 -1
|
@@ -8130,10 +8130,21 @@ class TimelineEvent extends MonthEvent {
|
|
|
8130
8130
|
'width': appWidth + 'px', 'left': appLeft + 'px', 'right': appRight + 'px', 'top': appTop + 'px'
|
|
8131
8131
|
});
|
|
8132
8132
|
this.wireAppointmentEvents(appointmentElement, event);
|
|
8133
|
-
this.renderEventElement(event, appointmentElement, cellTd);
|
|
8134
8133
|
if (this.parent.rowAutoHeight) {
|
|
8134
|
+
const conWrap = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
|
|
8135
|
+
const conWidth = conWrap.getBoundingClientRect().width;
|
|
8136
|
+
const isWithoutScroll = conWrap.offsetHeight === conWrap.clientHeight &&
|
|
8137
|
+
conWrap.offsetWidth === conWrap.clientWidth;
|
|
8138
|
+
this.renderEventElement(event, appointmentElement, cellTd);
|
|
8135
8139
|
const firstChild = this.getFirstChild(resIndex);
|
|
8136
8140
|
this.updateCellHeight(firstChild, height);
|
|
8141
|
+
if (isWithoutScroll &&
|
|
8142
|
+
(conWrap.offsetWidth > conWrap.clientWidth || conWidth !== conWrap.getBoundingClientRect().width)) {
|
|
8143
|
+
this.adjustAppointments(conWidth);
|
|
8144
|
+
}
|
|
8145
|
+
}
|
|
8146
|
+
else {
|
|
8147
|
+
this.renderEventElement(event, appointmentElement, cellTd);
|
|
8137
8148
|
}
|
|
8138
8149
|
}
|
|
8139
8150
|
else {
|
|
@@ -8225,6 +8236,21 @@ class TimelineEvent extends MonthEvent {
|
|
|
8225
8236
|
}
|
|
8226
8237
|
}
|
|
8227
8238
|
}
|
|
8239
|
+
adjustAppointments(conWidth) {
|
|
8240
|
+
const tr = this.parent.element.querySelector('.' + CONTENT_TABLE_CLASS + ' tbody tr');
|
|
8241
|
+
this.cellWidth = this.workCells[0].getBoundingClientRect().width;
|
|
8242
|
+
const currentPercentage = (this.cellWidth * tr.children.length) / (conWidth / 100);
|
|
8243
|
+
const apps = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CLASS));
|
|
8244
|
+
apps.forEach((app) => {
|
|
8245
|
+
if (this.parent.enableRtl && app.style.right !== '0px') {
|
|
8246
|
+
app.style.right = ((parseFloat(app.style.right) / 100) * currentPercentage) + 'px';
|
|
8247
|
+
}
|
|
8248
|
+
else if (app.style.left !== '0px') {
|
|
8249
|
+
app.style.left = ((parseFloat(app.style.left) / 100) * currentPercentage) + 'px';
|
|
8250
|
+
}
|
|
8251
|
+
app.style.width = ((parseFloat(app.style.width) / 100) * currentPercentage) + 'px';
|
|
8252
|
+
});
|
|
8253
|
+
}
|
|
8228
8254
|
getFirstChild(index) {
|
|
8229
8255
|
const query = '.' + CONTENT_TABLE_CLASS + ' tbody td';
|
|
8230
8256
|
let groupIndex = '';
|
|
@@ -21460,9 +21486,12 @@ class DragAndDrop extends ActionBase {
|
|
|
21460
21486
|
}
|
|
21461
21487
|
else {
|
|
21462
21488
|
if (this.isCursorAhead || cursorDrag) {
|
|
21463
|
-
|
|
21464
|
-
|
|
21489
|
+
const minutes = this.isTimelineDayProcess ? MINUTES_PER_DAY : this.actionObj.slotInterval;
|
|
21490
|
+
eventStart.setMinutes(eventStart.getMinutes() + minutes);
|
|
21465
21491
|
eventStart.setMilliseconds(-(eventDuration));
|
|
21492
|
+
if (eventStart.getTime() === resetTime(eventStart).getTime() && eventStart.getMinutes() === 0 && eventDuration === 0) {
|
|
21493
|
+
eventStart.setMinutes(-minutes);
|
|
21494
|
+
}
|
|
21466
21495
|
}
|
|
21467
21496
|
else {
|
|
21468
21497
|
eventStart.setMinutes(eventStart.getMinutes() -
|