UNPKG

devextreme

Version:

HTML5 JavaScript Component Suite for Responsive Web Development

75 lines (73 loc) 2.07 kB
/** * DevExtreme (cjs/ui/gantt/ui.gantt.task.area.container.js) * Version: 25.1.3 * Build date: Wed Jun 25 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ "use strict"; exports.TaskAreaContainer = void 0; var _scroll_view = _interopRequireDefault(require("../scroll_view")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e } } class TaskAreaContainer { constructor(element, ganttViewWidget) { this._element = element; this._scrollView = ganttViewWidget._createComponent(this._element, _scroll_view.default, { scrollByContent: false, scrollByThumb: true, showScrollbar: "onHover", direction: "both", onScroll: () => { ganttViewWidget.updateView() } }) } get scrollTop() { return this._scrollView.scrollTop() } set scrollTop(value) { const diff = value - this._scrollView.scrollTop(); if (0 !== diff) { this._scrollView.scrollBy({ left: 0, top: diff }) } } get scrollLeft() { return this._scrollView.scrollLeft() } set scrollLeft(value) { const diff = value - this._scrollView.scrollLeft(); if (0 !== diff) { this._scrollView.scrollBy({ left: diff, top: 0 }) } } get scrollWidth() { return this._scrollView.scrollWidth() } get scrollHeight() { return this._scrollView.scrollHeight() } get isExternal() { return true } getWidth() { return this._element.offsetWidth } getHeight() { return this._element.offsetHeight } getElement() { return this._element } } exports.TaskAreaContainer = TaskAreaContainer;