Skip to content

Commit 0ef53ce

Browse files
refactor(Scheduler): address Copilot review comments for workspace PR
- m_work_space_indicator.ts: revert createIndicator to _createIndicator (used in subclass, cannot be private), remove stale comment - m_timeline.ts: update calls to _createIndicator - agenda.tests.js: update test name to match renamed method
1 parent 9a959be commit 0ef53ce

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

packages/devextreme/js/__internal/scheduler/workspaces/m_timeline.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,13 +462,13 @@ class SchedulerTimeline extends SchedulerWorkSpace {
462462
const width = this.getIndicationWidth();
463463

464464
if (this.option('groupOrientation') === 'vertical') {
465-
$indicator = this.createIndicator($container);
465+
$indicator = this._createIndicator($container);
466466
setHeight($indicator, getBoundingRect($container.get(0)).height);
467467
$indicator.css('left', rtlOffset ? rtlOffset - width : width);
468468
} else {
469469
for (let i = 0; i < groupCount; i++) {
470470
const offset = this.isGroupedByDate() ? i * this.getCellWidth() : this._getCellCount() * this.getCellWidth() * i;
471-
$indicator = this.createIndicator($container);
471+
$indicator = this._createIndicator($container);
472472
setHeight($indicator, getBoundingRect($container.get(0)).height);
473473

474474
$indicator.css('left', rtlOffset ? rtlOffset - width - offset : width + offset);

packages/devextreme/js/__internal/scheduler/workspaces/m_work_space_indicator.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class SchedulerWorkSpaceIndicator extends SchedulerWorkSpace {
6464
const groupedByDate = this.isGroupedByDate();
6565
const repeatCount = groupedByDate ? 1 : groupCount;
6666
for (let i = 0; i < repeatCount; i++) {
67-
const $indicator = this.createIndicator($container);
67+
const $indicator = this._createIndicator($container);
6868

6969
setWidth(
7070
$indicator,
@@ -74,8 +74,7 @@ class SchedulerWorkSpaceIndicator extends SchedulerWorkSpace {
7474
}
7575
}
7676

77-
// Called from SchedulerTimeline._renderIndicator
78-
createIndicator($container) {
77+
_createIndicator($container) {
7978
const $indicator = $('<div>').addClass(SCHEDULER_DATE_TIME_INDICATOR_CLASS);
8079
$container.append($indicator);
8180

packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/agenda.tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module('Agenda', {}, () => {
6161
assert.deepEqual(firstViewDate, new Date(2016, 1, 17, 2), 'The first view date is OK');
6262
});
6363

64-
test('_removeEmptyRows method', async function(assert) {
64+
test('removeEmptyRows method', async function(assert) {
6565
const rows = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 1], [0, 0, 0, 0, 0], [1, 1, 1, 0, 1]];
6666

6767
const instance = createInstance();

0 commit comments

Comments
 (0)