@syncfusion/ej2-schedule 33.1.44 → 33.1.47
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/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 +17 -27
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +17 -27
- 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 +7 -7
- package/src/schedule/actions/action-base.js +1 -1
- package/src/schedule/actions/resize.js +14 -25
- package/src/schedule/event-renderer/timeline-view.js +2 -1
|
@@ -9280,7 +9280,8 @@ class TimelineEvent extends MonthEvent {
|
|
|
9280
9280
|
return (width > spannedWidth) ? width - spannedWidth : width - startWidth;
|
|
9281
9281
|
}
|
|
9282
9282
|
getEndTimeOfLastSlot(startHour, endHour, interval) {
|
|
9283
|
-
const
|
|
9283
|
+
const dstOffset = ((endHour.getTimezoneOffset() - startHour.getTimezoneOffset()) * MS_PER_MINUTE);
|
|
9284
|
+
const minutesInDay = (endHour.getTime() - startHour.getTime() - dstOffset) / MS_PER_MINUTE;
|
|
9284
9285
|
const lastSlotEndMinutes = Math.floor(minutesInDay / interval) * interval;
|
|
9285
9286
|
const lastSlotEndTime = new Date(startHour);
|
|
9286
9287
|
lastSlotEndTime.setMinutes(lastSlotEndMinutes);
|
|
@@ -21046,7 +21047,7 @@ class ActionBase {
|
|
|
21046
21047
|
const startHour = this.parent.activeView.getStartHour();
|
|
21047
21048
|
const intervalInMS = MS_PER_MINUTE * this.actionObj.interval;
|
|
21048
21049
|
dateInMS += (startHour.getHours() * 60 + startHour.getMinutes()) * MS_PER_MINUTE + startHour.getSeconds() * 1000;
|
|
21049
|
-
dateInMS = dateInMS + ((date.getTime() - dateInMS) / intervalInMS) * intervalInMS;
|
|
21050
|
+
dateInMS = dateInMS + Math.floor((date.getTime() - dateInMS) / intervalInMS) * intervalInMS;
|
|
21050
21051
|
return new Date(dateInMS);
|
|
21051
21052
|
}
|
|
21052
21053
|
getContentAreaDimension() {
|
|
@@ -21788,20 +21789,24 @@ class Resize extends ActionBase {
|
|
|
21788
21789
|
offsetValue += (this.parent.getElementWidth(this.actionObj.clone) - this.actionObj.cellWidth);
|
|
21789
21790
|
}
|
|
21790
21791
|
cellIndex = !isTimelineMonth ? Math.round(offsetValue / (this.parent.getElementWidth(tr) / noOfDays)) :
|
|
21791
|
-
Math.floor(offsetValue /
|
|
21792
|
+
Math.floor(offsetValue / (this.parent.getElementWidth(tr) / noOfDays));
|
|
21792
21793
|
cellIndex = isLeft ? cellIndex : isTimelineMonth ? cellIndex + 1 : cellIndex;
|
|
21793
21794
|
isLastCell = cellIndex === tdCollections.length;
|
|
21794
21795
|
cellIndex = (cellIndex < 0) ? 0 : (cellIndex >= noOfDays) ? noOfDays - 1 : cellIndex;
|
|
21795
21796
|
}
|
|
21796
21797
|
else {
|
|
21797
21798
|
const cellWidth = this.actionObj.cellWidth;
|
|
21798
|
-
cellIndex = isLeft ? Math.
|
|
21799
|
+
cellIndex = isLeft ? Math.floor(offset / this.actionObj.cellWidth) :
|
|
21799
21800
|
Math.ceil((offset + (this.parent.getElementWidth(this.actionObj.clone) - cellWidth)) / this.actionObj.cellWidth);
|
|
21800
21801
|
if (this.parent.enableRtl) {
|
|
21801
|
-
|
|
21802
|
-
|
|
21803
|
-
|
|
21804
|
-
|
|
21802
|
+
let cellOffsetWidth = 0;
|
|
21803
|
+
if (headerName === 'TimelineMonth' || (!this.parent.activeViewOptions.timeScale.enable &&
|
|
21804
|
+
!isTimelineMonth)) {
|
|
21805
|
+
cellOffsetWidth = this.actionObj.cellWidth;
|
|
21806
|
+
}
|
|
21807
|
+
const offsetWidth = (Math.floor(offset / this.actionObj.cellWidth) *
|
|
21808
|
+
this.actionObj.cellWidth) + (isLeft ? 0 : this.parent.getElementWidth(this.actionObj.clone) - cellOffsetWidth);
|
|
21809
|
+
cellIndex = Math.floor(offsetWidth / this.actionObj.cellWidth);
|
|
21805
21810
|
}
|
|
21806
21811
|
isLastCell = cellIndex === tdCollections.length;
|
|
21807
21812
|
cellIndex = this.getIndex(cellIndex);
|
|
@@ -21819,29 +21824,14 @@ class Resize extends ActionBase {
|
|
|
21819
21824
|
}
|
|
21820
21825
|
else {
|
|
21821
21826
|
if (!isLeft) {
|
|
21822
|
-
|
|
21823
|
-
const pixelsPerInterval = this.actionObj.cellWidth /
|
|
21824
|
-
(this.actionObj.slotInterval / this.actionObj.interval);
|
|
21825
|
-
const numIntervals = Math.round(cloneWidth / pixelsPerInterval);
|
|
21826
|
-
cloneWidth = numIntervals * pixelsPerInterval;
|
|
21827
|
-
offset = offset + cloneWidth;
|
|
21827
|
+
offset += this.parent.getElementWidth(this.actionObj.clone);
|
|
21828
21828
|
}
|
|
21829
21829
|
let spanMinutes = Math.ceil((this.actionObj.slotInterval / this.actionObj.cellWidth) *
|
|
21830
21830
|
(offset - Math.floor(offset / this.actionObj.cellWidth) * this.actionObj.cellWidth));
|
|
21831
|
-
spanMinutes = (isLastCell || (!isLeft && spanMinutes === 0
|
|
21831
|
+
spanMinutes = (isLastCell || (!isLeft && spanMinutes === 0 && !this.parent.enableRtl)) ?
|
|
21832
|
+
this.actionObj.slotInterval : spanMinutes;
|
|
21832
21833
|
resizeTime = new Date(resizeDate.getTime());
|
|
21833
|
-
resizeTime
|
|
21834
|
-
const isCustomResizeInterval = this.actionObj.interval !== this.actionObj.slotInterval;
|
|
21835
|
-
const initialCellTime = new Date(resizeTime.getTime());
|
|
21836
|
-
const intervalInMS = this.actionObj.interval * 60000;
|
|
21837
|
-
if (intervalInMS > 0 && isCustomResizeInterval) {
|
|
21838
|
-
if (this.resizeEdges.right || this.resizeEdges.left) {
|
|
21839
|
-
const eventTime = this.resizeEdges.right ? eventEnd : eventStart;
|
|
21840
|
-
const timeDifferenceMs = initialCellTime.getTime() - eventTime.getTime();
|
|
21841
|
-
const intervalCount = Math.round(timeDifferenceMs / intervalInMS);
|
|
21842
|
-
resizeTime = new Date(eventTime.getTime() + intervalCount * intervalInMS);
|
|
21843
|
-
}
|
|
21844
|
-
}
|
|
21834
|
+
resizeTime.setMinutes(resizeTime.getMinutes() + spanMinutes);
|
|
21845
21835
|
this.updateTimePosition(resizeTime);
|
|
21846
21836
|
}
|
|
21847
21837
|
}
|