[PE mobile] Almost maked Style Settings

This commit is contained in:
SergeyEzhin 2021-01-13 18:53:53 +03:00
parent 7da390d917
commit a6e1bf5394
2 changed files with 13 additions and 13 deletions

View file

@ -22,12 +22,13 @@ export class storeStyle {
} }
} }
} }
this.fillColor = color;
return this.fillColor;
}
@action changeFillColor (color) {
this.fillColor = color; this.fillColor = color;
} }
@action changeCustomColors (colors) {
this.customColors = colors;
}
} }

View file

@ -7,23 +7,22 @@ import { ThemeColorPalette, CustomColorPicker } from '../../../../../common/mobi
const PageStyle = props => { const PageStyle = props => {
const { t } = useTranslation(); const { t } = useTranslation();
const _t = t("View.Edit", { returnObjects: true }); const _t = t("View.Edit", { returnObjects: true });
const storeFocusObjects = props.storeFocusObjects; const storeFocusObjects = props.storeFocusObjects;
const slideObject = storeFocusObjects.slideObject; const slideObject = storeFocusObjects.slideObject;
const storePalette = props.storePalette; const storePalette = props.storePalette;
const storeStyle = props.storeStyle; const storeStyle = props.storeStyle;
storeStyle.getFillColor(slideObject);
const customColors = storePalette.customColors; const customColors = storePalette.customColors;
const fillColor = storeStyle.fillColor; storeStyle.fillColor ? storeStyle.fillColor : storeStyle.getFillColor(slideObject);
const fillColor = JSON.parse(JSON.stringify(storeStyle.fillColor));
console.log(fillColor);
const changeColor = (color, effectId, effectValue) => {
const changeColor = (color, effectId) => {
if (color !== 'empty') { if (color !== 'empty') {
if (effectId !==undefined ) { if (effectId !==undefined ) {
props.onFillColor({color: color, effectId: effectId}); storeStyle.changeFillColor({color: color, effectId: effectId, effectValue: effectValue});
props.onFillColor({color: color, effectId: effectId, effectValue: effectValue});
} else { } else {
storeStyle.changeFillColor(color);
props.onFillColor(color); props.onFillColor(color);
} }
} else { } else {