diff --git a/apps/documenteditor/mobile/src/store/focusObjects.js b/apps/documenteditor/mobile/src/store/focusObjects.js index fc6836f6e..46b1bcee6 100644 --- a/apps/documenteditor/mobile/src/store/focusObjects.js +++ b/apps/documenteditor/mobile/src/store/focusObjects.js @@ -18,8 +18,10 @@ export class storeFocusObjects { _settings.push('table'); } else if (Asc.c_oAscTypeSelectElement.Image === type) { if (object.get_ObjectValue().get_ChartProperties()) { - _settings.push('chart'); - } else if (object.get_ObjectValue().get_ShapeProperties()) { + // Exclude shapes if chart exist + let si = _settings.indexOf('shape'); + si < 0 ? _settings.push('chart') : _settings.splice(si,1,'chart'); + } else if (object.get_ObjectValue().get_ShapeProperties() && !_settings.includes('chart')) { _settings.push('shape'); } else { _settings.push('image'); @@ -30,10 +32,6 @@ export class storeFocusObjects { _settings.push('header'); } } - // Exclude shapes if chart exist - if (_settings.indexOf('chart') > -1) { - _settings = _settings.filter((value) => value !== 'shape'); - } return _settings.filter((value, index, self) => self.indexOf(value) === index); } @computed get headerType() {