Merge pull request #1687 from ONLYOFFICE/feature/bug-fixes
Feature/bug fixes
This commit is contained in:
commit
930e73890c
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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'}}
|
||||
|
|
Loading…
Reference in a new issue