@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
|
@@ -8330,10 +8330,21 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
8330
8330
|
'width': appWidth + 'px', 'left': appLeft + 'px', 'right': appRight + 'px', 'top': appTop + 'px'
|
|
8331
8331
|
});
|
|
8332
8332
|
this.wireAppointmentEvents(appointmentElement, event);
|
|
8333
|
-
this.renderEventElement(event, appointmentElement, cellTd);
|
|
8334
8333
|
if (this.parent.rowAutoHeight) {
|
|
8334
|
+
var conWrap = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
|
|
8335
|
+
var conWidth = conWrap.getBoundingClientRect().width;
|
|
8336
|
+
var isWithoutScroll = conWrap.offsetHeight === conWrap.clientHeight &&
|
|
8337
|
+
conWrap.offsetWidth === conWrap.clientWidth;
|
|
8338
|
+
this.renderEventElement(event, appointmentElement, cellTd);
|
|
8335
8339
|
var firstChild = this.getFirstChild(resIndex);
|
|
8336
8340
|
this.updateCellHeight(firstChild, height);
|
|
8341
|
+
if (isWithoutScroll &&
|
|
8342
|
+
(conWrap.offsetWidth > conWrap.clientWidth || conWidth !== conWrap.getBoundingClientRect().width)) {
|
|
8343
|
+
this.adjustAppointments(conWidth);
|
|
8344
|
+
}
|
|
8345
|
+
}
|
|
8346
|
+
else {
|
|
8347
|
+
this.renderEventElement(event, appointmentElement, cellTd);
|
|
8337
8348
|
}
|
|
8338
8349
|
}
|
|
8339
8350
|
else {
|
|
@@ -8425,6 +8436,22 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
8425
8436
|
}
|
|
8426
8437
|
}
|
|
8427
8438
|
};
|
|
8439
|
+
TimelineEvent.prototype.adjustAppointments = function (conWidth) {
|
|
8440
|
+
var _this = this;
|
|
8441
|
+
var tr = this.parent.element.querySelector('.' + CONTENT_TABLE_CLASS + ' tbody tr');
|
|
8442
|
+
this.cellWidth = this.workCells[0].getBoundingClientRect().width;
|
|
8443
|
+
var currentPercentage = (this.cellWidth * tr.children.length) / (conWidth / 100);
|
|
8444
|
+
var apps = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CLASS));
|
|
8445
|
+
apps.forEach(function (app) {
|
|
8446
|
+
if (_this.parent.enableRtl && app.style.right !== '0px') {
|
|
8447
|
+
app.style.right = ((parseFloat(app.style.right) / 100) * currentPercentage) + 'px';
|
|
8448
|
+
}
|
|
8449
|
+
else if (app.style.left !== '0px') {
|
|
8450
|
+
app.style.left = ((parseFloat(app.style.left) / 100) * currentPercentage) + 'px';
|
|
8451
|
+
}
|
|
8452
|
+
app.style.width = ((parseFloat(app.style.width) / 100) * currentPercentage) + 'px';
|
|
8453
|
+
});
|
|
8454
|
+
};
|
|
8428
8455
|
TimelineEvent.prototype.getFirstChild = function (index) {
|
|
8429
8456
|
var query = '.' + CONTENT_TABLE_CLASS + ' tbody td';
|
|
8430
8457
|
var groupIndex = '';
|
|
@@ -22218,9 +22245,12 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
22218
22245
|
}
|
|
22219
22246
|
else {
|
|
22220
22247
|
if (this.isCursorAhead || cursorDrag) {
|
|
22221
|
-
|
|
22222
|
-
|
|
22248
|
+
var minutes = this.isTimelineDayProcess ? MINUTES_PER_DAY : this.actionObj.slotInterval;
|
|
22249
|
+
eventStart.setMinutes(eventStart.getMinutes() + minutes);
|
|
22223
22250
|
eventStart.setMilliseconds(-(eventDuration));
|
|
22251
|
+
if (eventStart.getTime() === resetTime(eventStart).getTime() && eventStart.getMinutes() === 0 && eventDuration === 0) {
|
|
22252
|
+
eventStart.setMinutes(-minutes);
|
|
22253
|
+
}
|
|
22224
22254
|
}
|
|
22225
22255
|
else {
|
|
22226
22256
|
eventStart.setMinutes(eventStart.getMinutes() -
|