Merge pull request 'replacing menu item blocking with hiding' (#711) from fix/chart-menu into release/v9.1.0

This commit is contained in:
Julia Radzhabova
2025-09-22 15:12:44 +00:00
4 changed files with 8 additions and 12 deletions

View File

@ -1206,10 +1206,9 @@ define([], function () {
legendMenu.items[4].setChecked(legendPos === Asc.c_oAscChartLegendShowSettings.leftOverlay);
legendMenu.items[5].setChecked(legendPos === Asc.c_oAscChartLegendShowSettings.rightOverlay);
const supportedElements = chartElementMap[type] || chartElementMap[45] || [];
const supportedElements = chartElementMap[type] || [];
menu.items.forEach(function(item) {
item.setDisabled(supportedElements.indexOf(item.value) === -1);
item.setVisible(supportedElements.includes(item.value));
});
};

View File

@ -3021,10 +3021,9 @@ define([], function () {
legendMenu.items[4].setChecked(legendPos === Asc.c_oAscChartLegendShowSettings.leftOverlay);
legendMenu.items[5].setChecked(legendPos === Asc.c_oAscChartLegendShowSettings.rightOverlay);
const supportedElements = chartElementMap[type] || chartElementMap[45] || [];
const supportedElements = chartElementMap[type] || [];
menu.items.forEach(function(item) {
item.setDisabled(supportedElements.indexOf(item.value) === -1);
item.setVisible(supportedElements.includes(item.value));
});
};

View File

@ -1161,10 +1161,9 @@ define([], function () {
legendMenu.items[4].setChecked(legendPos === Asc.c_oAscChartLegendShowSettings.leftOverlay);
legendMenu.items[5].setChecked(legendPos === Asc.c_oAscChartLegendShowSettings.rightOverlay);
const supportedElements = chartElementMap[type] || chartElementMap[45] || [];
const supportedElements = chartElementMap[type] || [];
menu.items.forEach(function(item) {
item.setDisabled(supportedElements.indexOf(item.value) === -1);
item.setVisible(supportedElements.includes(item.value));
});
};

View File

@ -3844,10 +3844,9 @@ define([], function () {
legendMenu.items[4].setChecked(legendPos === Asc.c_oAscChartLegendShowSettings.leftOverlay);
legendMenu.items[5].setChecked(legendPos === Asc.c_oAscChartLegendShowSettings.rightOverlay);
const supportedElements = chartElementMap[type] || chartElementMap[45] || [];
const supportedElements = chartElementMap[type] || [];
menu.items.forEach(function(item) {
item.setDisabled(supportedElements.indexOf(item.value) === -1);
item.setVisible(supportedElements.includes(item.value));
});
};