UNPKG

devextreme

Version:

HTML5 JavaScript Component Suite for Responsive Web Development

46 lines (45 loc) 1.92 kB
/** * DevExtreme (cjs/ui/toolbar/strategy/toolbar.multiline.js) * Version: 23.2.6 * Build date: Wed May 01 2024 * * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ "use strict"; exports.MultiLineStrategy = void 0; var _size = require("../../../core/utils/size"); const TOOLBAR_LABEL_CLASS = "dx-toolbar-label"; let MultiLineStrategy = function() { function MultiLineStrategy(toolbar) { this._toolbar = toolbar } var _proto = MultiLineStrategy.prototype; _proto._initMarkup = function() {}; _proto._updateMenuVisibility = function() {}; _proto._renderMenuItems = function() {}; _proto._renderItem = function() {}; _proto._getMenuItems = function() {}; _proto._getToolbarItems = function() { var _this$_toolbar$option; return null !== (_this$_toolbar$option = this._toolbar.option("items")) && void 0 !== _this$_toolbar$option ? _this$_toolbar$option : [] }; _proto._getItemsWidth = function() { return this._toolbar._getSummaryItemsSize("width", this._toolbar.itemElements(), true) }; _proto._arrangeItems = function() { const $label = this._toolbar._$toolbarItemsContainer.find(".".concat("dx-toolbar-label")).eq(0); if (!$label.length) { return } const elementWidth = (0, _size.getWidth)(this._toolbar.$element()); const labelPaddings = (0, _size.getOuterWidth)($label) - (0, _size.getWidth)($label); $label.css("maxWidth", elementWidth - labelPaddings) }; _proto._hideOverflowItems = function() {}; _proto._dimensionChanged = function() {}; _proto._itemOptionChanged = function() {}; _proto._optionChanged = function() {}; return MultiLineStrategy }(); exports.MultiLineStrategy = MultiLineStrategy;