replacing menu item blocking with hiding

This commit is contained in:
Dmitry-Ilyushechkin
2025-09-22 18:01:43 +03:00
parent 4154d0e45c
commit 7bc9ce2da7
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));
});
};