Merge pull request #1687 from ONLYOFFICE/feature/bug-fixes

Feature/bug fixes
This commit is contained in:
maxkadushkin 2022-04-07 09:54:49 +03:00 committed by GitHub
commit 930e73890c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -6,12 +6,14 @@ class EditParagraphController extends Component {
constructor (props) {
super(props);
props.storeParagraphSettings.setBackColor(undefined);
this.onStyleClick = this.onStyleClick.bind(this);
}
onStyleClick (name) {
const api = Common.EditorApi.get();
if (api) {
api.put_Style(name);
this.props.storeParagraphSettings.changeParaStyleName(name);
}
}

View file

@ -229,7 +229,11 @@ const EditParagraph = props => {
key={index}
radio
checked={curStyleName === style.name}
onClick={() => {props.onStyleClick(style.name)}}
onClick={() => {
if(curStyleName !== style.name) {
props.onStyleClick(style.name);
}
}}
>
<div slot="inner"
style={{backgroundImage: 'url(' + style.image + ')', width: thumbSize.width + 'px', height: thumbSize.height + 'px', backgroundSize: thumbSize.width + 'px ' + thumbSize.height + 'px', backgroundRepeat: 'no-repeat'}}