@syncfusion/ej2-schedule 26.1.40 → 26.1.41

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.
@@ -10,17 +10,19 @@ export declare const MS_PER_MINUTE: number;
10
10
  *
11
11
  * @param {Element} container Accepts the DOM element
12
12
  * @param {string} elementClass Accepts the element class
13
+ * @param {boolean} isTransformed Accepts the boolean value that indicates the status of the transform style applied to the element
13
14
  * @returns {number} Returns the height of the element
14
15
  */
15
- export declare function getElementHeightFromClass(container: Element, elementClass: string): number;
16
+ export declare function getElementHeightFromClass(container: Element, elementClass: string, isTransformed?: boolean): number;
16
17
  /**
17
18
  * Method to get width from element
18
19
  *
19
20
  * @param {Element} container Accepts the DOM element
20
21
  * @param {string} elementClass Accepts the element class
22
+ * @param {boolean} isTransformed Accepts the boolean value that indicates the status of the transform style applied to the element
21
23
  * @returns {number} Returns the width of the element
22
24
  */
23
- export declare function getElementWidthFromClass(container: Element, elementClass: string): number;
25
+ export declare function getElementWidthFromClass(container: Element, elementClass: string, isTransformed?: boolean): number;
24
26
  /**
25
27
  * Method to get translateY value
26
28
  *
@@ -242,20 +244,23 @@ export declare function capitalizeFirstWord(inputString: string, type: string):
242
244
  * Method to get element cell width
243
245
  *
244
246
  * @param {HTMLElement} element Accepts the DOM element
247
+ * @param {boolean} isTransformed Accepts the boolean value that indicates the status of the transform style applied to the element
245
248
  * @returns {number} Returns the width of the given element
246
249
  */
247
- export declare function getElementWidth(element: HTMLElement): number;
250
+ export declare function getElementWidth(element: HTMLElement, isTransformed?: boolean): number;
248
251
  /**
249
252
  * Method to get element cell Height
250
253
  *
251
254
  * @param {HTMLElement} element Accepts the DOM element
255
+ * @param {boolean} isTransformed Accepts the boolean value that indicates the status of the transform style applied to the element
252
256
  * @returns {number} Returns the Height of the given element
253
257
  */
254
- export declare function getElementHeight(element: HTMLElement): number;
258
+ export declare function getElementHeight(element: HTMLElement, isTransformed?: boolean): number;
255
259
  /**
256
260
  * Method to get element cell Top
257
261
  *
258
262
  * @param {HTMLElement} element Accepts the DOM element
263
+ * @param {boolean} isTransformed Accepts the boolean value that indicates the status of the transform style applied to the element
259
264
  * @returns {number} Returns the top value of the given element
260
265
  */
261
- export declare function getElementTop(element: HTMLElement): number;
266
+ export declare function getElementTop(element: HTMLElement, isTransformed?: boolean): number;
@@ -12,15 +12,16 @@ export var MS_PER_MINUTE = 60000;
12
12
  *
13
13
  * @param {Element} container Accepts the DOM element
14
14
  * @param {string} elementClass Accepts the element class
15
+ * @param {boolean} isTransformed Accepts the boolean value that indicates the status of the transform style applied to the element
15
16
  * @returns {number} Returns the height of the element
16
17
  */
17
- export function getElementHeightFromClass(container, elementClass) {
18
+ export function getElementHeightFromClass(container, elementClass, isTransformed) {
18
19
  var height = 0;
19
20
  var el = createElement('div', { className: elementClass }).cloneNode();
20
21
  el.style.visibility = 'hidden';
21
22
  el.style.position = 'absolute';
22
23
  container.appendChild(el);
23
- height = getElementHeight(el);
24
+ height = getElementHeight(el, isTransformed);
24
25
  remove(el);
25
26
  return height;
26
27
  }
@@ -29,15 +30,16 @@ export function getElementHeightFromClass(container, elementClass) {
29
30
  *
30
31
  * @param {Element} container Accepts the DOM element
31
32
  * @param {string} elementClass Accepts the element class
33
+ * @param {boolean} isTransformed Accepts the boolean value that indicates the status of the transform style applied to the element
32
34
  * @returns {number} Returns the width of the element
33
35
  */
34
- export function getElementWidthFromClass(container, elementClass) {
36
+ export function getElementWidthFromClass(container, elementClass, isTransformed) {
35
37
  var width = 0;
36
38
  var el = createElement('div', { className: elementClass }).cloneNode();
37
39
  el.style.visibility = 'hidden';
38
40
  el.style.position = 'absolute';
39
41
  container.appendChild(el);
40
- width = getElementWidth(el);
42
+ width = getElementWidth(el, isTransformed);
41
43
  remove(el);
42
44
  return width;
43
45
  }
@@ -429,26 +431,29 @@ export function capitalizeFirstWord(inputString, type) {
429
431
  * Method to get element cell width
430
432
  *
431
433
  * @param {HTMLElement} element Accepts the DOM element
434
+ * @param {boolean} isTransformed Accepts the boolean value that indicates the status of the transform style applied to the element
432
435
  * @returns {number} Returns the width of the given element
433
436
  */
434
- export function getElementWidth(element) {
435
- return document.body.style.transform.includes('scale') ? element.offsetWidth : element.getBoundingClientRect().width;
437
+ export function getElementWidth(element, isTransformed) {
438
+ return isTransformed ? element.offsetWidth : element.getBoundingClientRect().width;
436
439
  }
437
440
  /**
438
441
  * Method to get element cell Height
439
442
  *
440
443
  * @param {HTMLElement} element Accepts the DOM element
444
+ * @param {boolean} isTransformed Accepts the boolean value that indicates the status of the transform style applied to the element
441
445
  * @returns {number} Returns the Height of the given element
442
446
  */
443
- export function getElementHeight(element) {
444
- return document.body.style.transform.includes('scale') ? element.offsetHeight : element.getBoundingClientRect().height;
447
+ export function getElementHeight(element, isTransformed) {
448
+ return isTransformed ? element.offsetHeight : element.getBoundingClientRect().height;
445
449
  }
446
450
  /**
447
451
  * Method to get element cell Top
448
452
  *
449
453
  * @param {HTMLElement} element Accepts the DOM element
454
+ * @param {boolean} isTransformed Accepts the boolean value that indicates the status of the transform style applied to the element
450
455
  * @returns {number} Returns the top value of the given element
451
456
  */
452
- export function getElementTop(element) {
453
- return document.body.style.transform.includes('scale') ? element.offsetTop : element.getBoundingClientRect().top;
457
+ export function getElementTop(element, isTransformed) {
458
+ return isTransformed ? element.offsetTop : element.getBoundingClientRect().top;
454
459
  }
@@ -108,11 +108,11 @@ var InlineEdit = /** @class */ (function () {
108
108
  var allDayElements = [].slice.call(this.parent.element.querySelectorAll('.' + cls.ALLDAY_APPOINTMENT_CLASS));
109
109
  var allDayLevel = 0;
110
110
  if (allDayElements.length > 0) {
111
- allDayLevel = Math.floor(util.getElementHeight(this.parent.element.querySelector('.' + cls.ALLDAY_ROW_CLASS)) /
111
+ allDayLevel = Math.floor(this.parent.getElementHeight(this.parent.element.querySelector('.' + cls.ALLDAY_ROW_CLASS)) /
112
112
  allDayElements[0].offsetHeight) - 1;
113
113
  }
114
114
  verticalEvent.allDayLevel = allDayLevel;
115
- var appHeight = util.getElementHeightFromClass(this.parent.element.querySelector('.' + cls.ALLDAY_APPOINTMENT_WRAPPER_CLASS), cls.APPOINTMENT_CLASS);
115
+ var appHeight = this.parent.getElementHeightFromClass(this.parent.element.querySelector('.' + cls.ALLDAY_APPOINTMENT_WRAPPER_CLASS), cls.APPOINTMENT_CLASS);
116
116
  var cellTop = verticalEvent.allDayElement.length > 0 ? verticalEvent.allDayElement[0].offsetTop : 0;
117
117
  verticalEvent.renderAllDayEvents(saveObj, index, resIndex, daysCount, this.parent.allowInline, cellTop, appHeight);
118
118
  }
@@ -140,7 +140,7 @@ var InlineEdit = /** @class */ (function () {
140
140
  monthEvent.cellWidth = monthEvent.workCells[0].offsetWidth;
141
141
  monthEvent.cellHeight = monthEvent.workCells[0].offsetHeight;
142
142
  monthEvent.eventHeight =
143
- util.getElementHeightFromClass(this.parent.monthModule.element || monthEvent.element, cls.APPOINTMENT_CLASS);
143
+ this.parent.getElementHeightFromClass(this.parent.monthModule.element || monthEvent.element, cls.APPOINTMENT_CLASS);
144
144
  monthEvent.getSlotDates(workDays);
145
145
  var filteredDates = monthEvent.getRenderedDates(renderDates);
146
146
  var spannedEvents = monthEvent.splitEvent(saveObject, filteredDates || renderDates);
@@ -164,7 +164,7 @@ var InlineEdit = /** @class */ (function () {
164
164
  var dayLength = this.parent.element.querySelectorAll('.' + cls.CONTENT_TABLE_CLASS + ' tbody tr').length === 0 ?
165
165
  0 : this.parent.element.querySelectorAll('.' + cls.CONTENT_TABLE_CLASS + ' tbody tr')[0].children.length;
166
166
  timelineView.slotsPerDay = dayLength / timelineView.dateRender.length;
167
- timelineView.eventHeight = util.getElementHeightFromClass(timelineView.element, cls.APPOINTMENT_CLASS);
167
+ timelineView.eventHeight = this.parent.getElementHeightFromClass(timelineView.element, cls.APPOINTMENT_CLASS);
168
168
  timelineView.renderEvents(saveObject, resIndex);
169
169
  };
170
170
  InlineEdit.prototype.getEventDaysCount = function (saveObj) {
@@ -96,7 +96,7 @@ var MonthEvent = /** @class */ (function (_super) {
96
96
  this.monthHeaderHeight = wrapper.offsetTop - cellTd.offsetTop;
97
97
  cellTd.removeChild(wrapper);
98
98
  }
99
- this.eventHeight = util.getElementHeightFromClass(this.element, cls.APPOINTMENT_CLASS);
99
+ this.eventHeight = this.parent.getElementHeightFromClass(this.element, cls.APPOINTMENT_CLASS);
100
100
  var selector = '.' + cls.CONTENT_TABLE_CLASS + ' tbody tr';
101
101
  this.addCellHeight(selector, this.eventHeight, (this.parent.currentView === 'Month' ? EVENT_GAP : 2), this.monthHeaderHeight, this.moreIndicatorHeight);
102
102
  var scrollTop = conWrap.scrollTop;
@@ -175,8 +175,8 @@ var MonthEvent = /** @class */ (function (_super) {
175
175
  });
176
176
  }
177
177
  var cellDetail = this.workCells[this.parent.activeView.isTimelineView() ? 0 : this.workCells.length - 1];
178
- this.cellWidth = util.getElementWidth(cellDetail);
179
- this.cellHeight = util.getElementHeight(cellDetail);
178
+ this.cellWidth = this.parent.getElementWidth(cellDetail);
179
+ this.cellHeight = this.parent.getElementHeight(cellDetail);
180
180
  this.dateRender = dateRender;
181
181
  var filteredDates = this.getRenderedDates(dateRender);
182
182
  this.getSlotDates(workDays || this.parent.activeViewOptions.workDays);
@@ -48,7 +48,7 @@ var TimelineEvent = /** @class */ (function (_super) {
48
48
  this.parent.activeViewOptions.headerRows.slice(-1)[0].option !== 'Hour') {
49
49
  this.renderType = 'day';
50
50
  var workCell = this.content.querySelector('.' + cls.WORK_CELLS_CLASS);
51
- this.cellWidth = util.getElementWidth(workCell) / +(workCell.getAttribute('colspan') || 1);
51
+ this.cellWidth = this.parent.getElementWidth(workCell) / +(workCell.getAttribute('colspan') || 1);
52
52
  this.slotsPerDay = 1;
53
53
  }
54
54
  else {
@@ -218,14 +218,14 @@ var TimelineEvent = /** @class */ (function (_super) {
218
218
  this.wireAppointmentEvents(appointmentElement, event);
219
219
  if (this.parent.rowAutoHeight) {
220
220
  var conWrap = this.parent.element.querySelector('.' + cls.CONTENT_WRAP_CLASS);
221
- var conWidth = util.getElementWidth(conWrap);
221
+ var conWidth = this.parent.getElementWidth(conWrap);
222
222
  var isWithoutScroll = conWrap.offsetHeight === conWrap.clientHeight &&
223
223
  conWrap.offsetWidth === conWrap.clientWidth;
224
224
  this.renderEventElement(event, appointmentElement, cellTd);
225
225
  var firstChild = this.getFirstChild(resIndex);
226
226
  this.updateCellHeight(firstChild, height);
227
227
  if (isWithoutScroll &&
228
- (conWrap.offsetWidth > conWrap.clientWidth || conWidth !== util.getElementWidth(conWrap))) {
228
+ (conWrap.offsetWidth > conWrap.clientWidth || conWidth !== this.parent.getElementWidth(conWrap))) {
229
229
  this.adjustAppointments(conWidth);
230
230
  }
231
231
  }
@@ -344,7 +344,7 @@ var TimelineEvent = /** @class */ (function (_super) {
344
344
  TimelineEvent.prototype.adjustAppointments = function (conWidth) {
345
345
  var _this = this;
346
346
  var tr = this.parent.element.querySelector('.' + cls.CONTENT_TABLE_CLASS + ' tbody tr');
347
- var actualCellWidth = util.getElementWidth(this.workCells[0]);
347
+ var actualCellWidth = this.parent.getElementWidth(this.workCells[0]);
348
348
  this.cellWidth = actualCellWidth / +(this.workCells[0].getAttribute('colspan') || 1);
349
349
  var currentPercentage = (actualCellWidth * tr.children.length) / (conWidth / 100);
350
350
  var apps = [].slice.call(this.parent.element.querySelectorAll('.' + cls.APPOINTMENT_CLASS));
@@ -129,7 +129,7 @@ var VerticalEvent = /** @class */ (function (_super) {
129
129
  this.resources = this.parent.resourceBase.renderedResources;
130
130
  }
131
131
  this.cellHeight =
132
- parseFloat(util.getElementHeight(this.parent.element.querySelector('.e-content-wrap tbody tr')).toFixed(2));
132
+ parseFloat(this.parent.getElementHeight(this.parent.element.querySelector('.e-content-wrap tbody tr')).toFixed(2));
133
133
  this.dateRender[0] = this.parent.activeView.renderDates;
134
134
  if (this.parent.activeViewOptions.group.resources.length > 0) {
135
135
  for (var i = 0, len = this.resources.length; i < len; i++) {
@@ -215,7 +215,7 @@ var VerticalEvent = /** @class */ (function (_super) {
215
215
  var resources = this.getResourceList();
216
216
  var dateCount = this.getStartCount();
217
217
  var isRender;
218
- var appHeight = eventType === 'allDayEvents' ? util.getElementHeightFromClass(this.element.querySelector('.' + cls.ALLDAY_APPOINTMENT_WRAPPER_CLASS), cls.APPOINTMENT_CLASS) : 0;
218
+ var appHeight = eventType === 'allDayEvents' ? this.parent.getElementHeightFromClass(this.element.querySelector('.' + cls.ALLDAY_APPOINTMENT_WRAPPER_CLASS), cls.APPOINTMENT_CLASS) : 0;
219
219
  var allDayRowTop = eventType === 'allDayEvents' && this.allDayElement.length > 0 ? this.allDayElement[0].offsetTop : 0;
220
220
  var _loop_1 = function (resource) {
221
221
  isRender = true;
@@ -89,10 +89,10 @@ var YearEvent = /** @class */ (function (_super) {
89
89
  YearEvent.prototype.timelineYearViewEvents = function () {
90
90
  var _this = this;
91
91
  var workCell = this.parent.element.querySelector('.' + cls.WORK_CELLS_CLASS + ':not(.' + cls.OTHERMONTH_CLASS + ')');
92
- this.cellWidth = util.getElementWidth(workCell);
92
+ this.cellWidth = this.parent.getElementWidth(workCell);
93
93
  this.cellHeader = util.getOuterHeight(workCell.querySelector('.' + cls.DATE_HEADER_CLASS));
94
94
  var eventTable = this.parent.element.querySelector('.' + cls.EVENT_TABLE_CLASS);
95
- this.eventHeight = util.getElementHeightFromClass(eventTable, cls.APPOINTMENT_CLASS);
95
+ this.eventHeight = this.parent.getElementHeightFromClass(eventTable, cls.APPOINTMENT_CLASS);
96
96
  var selector = "." + cls.MONTH_HEADER_WRAPPER + " tbody tr,." + cls.RESOURCE_COLUMN_TABLE_CLASS + " tbody tr,." + cls.CONTENT_TABLE_CLASS + " tbody tr";
97
97
  this.addCellHeight(selector, this.eventHeight, EVENT_GAP, this.cellHeader, this.moreIndicatorHeight);
98
98
  var wrapperCollection = [].slice.call(this.parent.element.querySelectorAll('.' + cls.APPOINTMENT_CONTAINER_CLASS));
@@ -248,10 +248,10 @@ var YearEvent = /** @class */ (function (_super) {
248
248
  var contentTable = this.parent.element.querySelector('.' + cls.CONTENT_WRAP_CLASS);
249
249
  var isVerticalScrollbarAvail = contentTable.offsetWidth > contentTable.clientWidth;
250
250
  var workCell = this.parent.element.querySelector('.' + cls.WORK_CELLS_CLASS);
251
- this.cellWidth = util.getElementWidth(workCell);
251
+ this.cellWidth = this.parent.getElementWidth(workCell);
252
252
  this.cellHeader = 0;
253
253
  var eventTable = this.parent.element.querySelector('.' + cls.EVENT_TABLE_CLASS);
254
- this.eventHeight = util.getElementHeightFromClass(eventTable, cls.APPOINTMENT_CLASS);
254
+ this.eventHeight = this.parent.getElementHeightFromClass(eventTable, cls.APPOINTMENT_CLASS);
255
255
  var selector = "." + cls.MONTH_HEADER_WRAPPER + " tbody tr,." + cls.RESOURCE_COLUMN_TABLE_CLASS + " tbody tr,." + cls.CONTENT_TABLE_CLASS + " tbody tr";
256
256
  this.addCellHeight(selector, this.eventHeight, EVENT_GAP, this.cellHeader, this.moreIndicatorHeight);
257
257
  var wrapperCollection = [].slice.call(this.parent.element.querySelectorAll('.' + cls.APPOINTMENT_CONTAINER_CLASS));
@@ -293,7 +293,7 @@ var YearEvent = /** @class */ (function (_super) {
293
293
  appWrapper.forEach(function (appWrap, cellIndex) {
294
294
  var td = row.querySelector("td:nth-child(" + (cellIndex + 1) + ")");
295
295
  var app = [].slice.call(appWrap.children);
296
- var width = util.getElementWidth(td);
296
+ var width = _this.parent.getElementWidth(td);
297
297
  var left = td.offsetLeft;
298
298
  if (_this.parent.enableRtl) {
299
299
  var right_1 = conTable_1.offsetWidth - left - td.offsetWidth;
@@ -72,7 +72,7 @@ var TimelineViews = /** @class */ (function (_super) {
72
72
  }
73
73
  var scrollLeft;
74
74
  if (isNullOrUndefined(hour) || !this.parent.activeViewOptions.timeScale.enable) {
75
- scrollLeft = index * util.getElementWidth(this.element.querySelector('.e-work-cells'));
75
+ scrollLeft = index * this.parent.getElementWidth(this.element.querySelector('.e-work-cells'));
76
76
  }
77
77
  else {
78
78
  scrollLeft = isNullOrUndefined(scrollDate) ? this.getLeftFromDateTime(null, date) :
@@ -159,7 +159,7 @@ var TimelineViews = /** @class */ (function (_super) {
159
159
  if (this.parent.activeView.colLevels[parseInt(index.toString(), 10)] &&
160
160
  this.parent.activeView.colLevels[parseInt(index.toString(), 10)][0].colSpan) {
161
161
  diffInDates = currentDateIndex[0] * this.parent.activeView.colLevels[parseInt(index.toString(), 10)][0].colSpan *
162
- util.getElementWidth(this.element.querySelector('.e-work-cells'));
162
+ this.parent.getElementWidth(this.element.querySelector('.e-work-cells'));
163
163
  }
164
164
  else {
165
165
  var endHour = this.getEndHour();
@@ -169,8 +169,8 @@ var TimelineViews = /** @class */ (function (_super) {
169
169
  }
170
170
  }
171
171
  }
172
- return diffInDates + ((diffInMinutes * util.getElementWidth(this.element.querySelector('.e-work-cells')) * this.parent.activeViewOptions.timeScale.slotCount) /
173
- this.parent.activeViewOptions.timeScale.interval);
172
+ return diffInDates + ((diffInMinutes * this.parent.getElementWidth(this.element.querySelector('.e-work-cells'))
173
+ * this.parent.activeViewOptions.timeScale.slotCount) / this.parent.activeViewOptions.timeScale.interval);
174
174
  };
175
175
  TimelineViews.prototype.renderHeader = function () {
176
176
  var tr = createElement('tr');
@@ -245,11 +245,8 @@ var VerticalView = /** @class */ (function (_super) {
245
245
  var currentDate = this.parent.getCurrentTime();
246
246
  if (this.parent.showTimeIndicator && this.isWorkHourRange(currentDate)) {
247
247
  var currentDateIndex = this.getCurrentTimeIndicatorIndex();
248
- if (currentDateIndex.length > 0) {
249
- var workCells = [].slice.call(this.element.querySelectorAll('.' + cls.WORK_CELLS_CLASS));
250
- if (workCells.length > 0) {
251
- this.changeCurrentTimePosition();
252
- }
248
+ if (currentDateIndex.length > 0 && !isNullOrUndefined(this.element.querySelector('.' + cls.WORK_CELLS_CLASS))) {
249
+ this.changeCurrentTimePosition();
253
250
  if (isNullOrUndefined(this.currentTimeIndicatorTimer)) {
254
251
  var interval = util.MS_PER_MINUTE - ((currentDate.getSeconds() * 1000) + currentDate.getMilliseconds());
255
252
  if (interval <= (util.MS_PER_MINUTE - 1000)) {
@@ -374,7 +371,7 @@ var VerticalView = /** @class */ (function (_super) {
374
371
  this.parent.activeViewOptions.timeScale.interval;
375
372
  };
376
373
  VerticalView.prototype.getWorkCellHeight = function () {
377
- return parseFloat(util.getElementHeight(this.element.querySelector('.' + cls.WORK_CELLS_CLASS)).toFixed(2));
374
+ return parseFloat(this.parent.getElementHeight(this.element.querySelector('.' + cls.WORK_CELLS_CLASS)).toFixed(2));
378
375
  };
379
376
  VerticalView.prototype.getTdContent = function (date, type, groupIndex) {
380
377
  var cntEle;
@@ -677,12 +674,25 @@ var VerticalView = /** @class */ (function (_super) {
677
674
  var rows = [];
678
675
  var tr = createElement('tr');
679
676
  var td = createElement('td', { attrs: { 'aria-selected': 'false' } });
677
+ var existingGroupIndices = new Set();
678
+ if (this.parent.virtualScrollModule && this.parent.activeViewOptions.group.resources.length > 0 &&
679
+ this.parent.virtualScrollModule.existingDataCollection.length > 0) {
680
+ existingGroupIndices = new Set(this.parent.virtualScrollModule.existingDataCollection.map(function (data) { return data.groupIndex; }));
681
+ }
680
682
  var handler = function (r) {
681
683
  var ntr = tr.cloneNode();
682
684
  for (var _i = 0, _a = _this.colLevels[_this.colLevels.length - 1]; _i < _a.length; _i++) {
683
685
  var tdData = _a[_i];
684
- var ntd = _this.createContentTd(tdData, r, td);
685
- ntr.appendChild(ntd);
686
+ var isAllowTdCreation = true;
687
+ if (_this.parent.virtualScrollModule && _this.parent.activeViewOptions.group.resources.length > 0) {
688
+ if (existingGroupIndices.has(tdData.groupIndex)) {
689
+ isAllowTdCreation = false;
690
+ }
691
+ }
692
+ if (isAllowTdCreation) {
693
+ var ntd = _this.createContentTd(tdData, r, td);
694
+ ntr.appendChild(ntd);
695
+ }
686
696
  }
687
697
  rows.push(ntr);
688
698
  return r;
@@ -493,7 +493,7 @@ var ViewBase = /** @class */ (function () {
493
493
  if (this.isTimelineView()) {
494
494
  var colElements = this.getColElements();
495
495
  var contentBody = this.element.querySelector('.' + cls.CONTENT_TABLE_CLASS + ' tbody');
496
- var colWidth_1 = (util.getElementWidth(contentBody) / (colElements.length / 2));
496
+ var colWidth_1 = (this.parent.getElementWidth(contentBody) / (colElements.length / 2));
497
497
  if (content.offsetHeight !== content.clientHeight) {
498
498
  var resourceColumn = this.parent.element.querySelector('.' + cls.RESOURCE_COLUMN_WRAP_CLASS);
499
499
  if (!isNullOrUndefined(resourceColumn) && resourceColumn.offsetHeight !== content.clientHeight) {