devextreme
Version:
HTML5 JavaScript Component Suite for Responsive Web Development
43 lines (42 loc) • 1.37 kB
JavaScript
/**
* DevExtreme (esm/__internal/ui/toolbar/strategy/m_toolbar.multiline.js)
* Version: 24.2.7
* Build date: Mon Apr 28 2025
*
* Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import {
getOuterWidth,
getWidth
} from "../../../../core/utils/size";
const TOOLBAR_LABEL_CLASS = "dx-toolbar-label";
export class MultiLineStrategy {
constructor(toolbar) {
this._toolbar = toolbar
}
_initMarkup() {}
_updateMenuVisibility() {}
_renderMenuItems() {}
_renderItem() {}
_getMenuItems() {}
_getToolbarItems() {
return this._toolbar.option("items") ?? []
}
_getItemsWidth() {
return this._toolbar._getSummaryItemsSize("width", this._toolbar._itemElements(), true)
}
_arrangeItems() {
const $label = this._toolbar._$toolbarItemsContainer.find(".dx-toolbar-label").eq(0);
if (!$label.length) {
return
}
const elementWidth = getWidth(this._toolbar.$element());
const labelPaddings = getOuterWidth($label) - getWidth($label);
$label.css("maxWidth", elementWidth - labelPaddings)
}
_hideOverflowItems() {}
_dimensionChanged() {}
_itemOptionChanged() {}
_optionChanged() {}
}