From 0512adb05451c0c57e451b748a1c16f694856529 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Wed, 13 Jan 2021 17:08:35 +0300 Subject: [PATCH] [PE mobile] Make Style Settings --- .../mobile/src/controller/edit/Style.jsx | 24 +++++- .../mobile/src/store/style.js | 36 +++++---- .../mobile/src/view/edit/Edit.jsx | 5 ++ .../mobile/src/view/edit/Style.jsx | 74 ++++++++++++++----- 4 files changed, 106 insertions(+), 33 deletions(-) diff --git a/apps/presentationeditor/mobile/src/controller/edit/Style.jsx b/apps/presentationeditor/mobile/src/controller/edit/Style.jsx index 67567013e..7bec0d321 100644 --- a/apps/presentationeditor/mobile/src/controller/edit/Style.jsx +++ b/apps/presentationeditor/mobile/src/controller/edit/Style.jsx @@ -1,14 +1,34 @@ import React, { Component } from "react"; -import Style from "../../view/edit/Style"; +import { Style } from "../../view/edit/Style"; class StyleController extends Component { constructor(props) { super(props); } + onFillColor(color) { + const api = Common.EditorApi.get(); + + let props = new Asc.CAscSlideProps(), + fill = new Asc.asc_CShapeFill(); + + if (color == 'transparent') { + fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL); + fill.put_fill(null); + } else { + fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID); + fill.put_fill(new Asc.asc_CFillSolid()); + fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(color)); + } + + props.put_background(fill); + api.SetSlideProps(props); + + }; + render() { return ( -