From d55aad76ac2645ed5773644792b52a718edd70db Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Wed, 5 May 2021 16:06:07 +0300 Subject: [PATCH] Bug 49157 --- .../lib/component/ThemeColorPalette.jsx | 2 +- .../mobile/src/store/textSettings.js | 20 +++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/apps/common/mobile/lib/component/ThemeColorPalette.jsx b/apps/common/mobile/lib/component/ThemeColorPalette.jsx index 2f1db482a..7a7dd86ad 100644 --- a/apps/common/mobile/lib/component/ThemeColorPalette.jsx +++ b/apps/common/mobile/lib/component/ThemeColorPalette.jsx @@ -11,7 +11,7 @@ const ThemeColors = ({ themeColors, onColorClick, curColor }) => { {row.map((effect, index) => { return( {onColorClick(effect.color, effect.effectId, effect.effectValue)}} > diff --git a/apps/documenteditor/mobile/src/store/textSettings.js b/apps/documenteditor/mobile/src/store/textSettings.js index 44fd4cd43..9f3efa926 100644 --- a/apps/documenteditor/mobile/src/store/textSettings.js +++ b/apps/documenteditor/mobile/src/store/textSettings.js @@ -168,14 +168,22 @@ export class storeTextSettings { resetBackgroundColor (color) { let value; - if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) { - value = { - color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), - effectValue: color.get_value() + + if(color) { + if (color.get_auto()) { + value = 'transparent' + } else { + if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) { + value = { + color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), + effectValue: color.get_value() + } + } else { + value = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()); + } } - } else { - value = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()); } + this.backgroundColor = value; } } \ No newline at end of file