devextreme
Version:
HTML5 JavaScript Component Suite for Responsive Web Development
36 lines (35 loc) • 1.27 kB
JavaScript
/**
* DevExtreme (ui/scheduler/workspaces/ui.scheduler.timeline_week.js)
* Version: 20.1.7
* Build date: Tue Aug 25 2020
*
* Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
;
var registerComponent = require("../../../core/component_registrator");
var SchedulerTimeline = require("./ui.scheduler.timeline");
var getBoundingRect = require("../../../core/utils/position").getBoundingRect;
var TIMELINE_CLASS = "dx-scheduler-timeline-week";
var SchedulerTimelineWeek = SchedulerTimeline.inherit({
_getElementClass: function() {
return TIMELINE_CLASS
},
_getCellCount: function() {
return this.callBase() * this._getWeekDuration()
},
_getHeaderPanelCellWidth: function($headerRow) {
return getBoundingRect($headerRow.children().first().get(0)).width
},
_getWeekDuration: function() {
return 7
},
_needRenderWeekHeader: function() {
return true
},
_incrementDate: function(date) {
date.setDate(date.getDate() + 1)
}
});
registerComponent("dxSchedulerTimelineWeek", SchedulerTimelineWeek);
module.exports = SchedulerTimelineWeek;