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) {
|
constructor (props) {
|
||||||
super(props);
|
super(props);
|
||||||
props.storeParagraphSettings.setBackColor(undefined);
|
props.storeParagraphSettings.setBackColor(undefined);
|
||||||
|
this.onStyleClick = this.onStyleClick.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
onStyleClick (name) {
|
onStyleClick (name) {
|
||||||
const api = Common.EditorApi.get();
|
const api = Common.EditorApi.get();
|
||||||
if (api) {
|
if (api) {
|
||||||
api.put_Style(name);
|
api.put_Style(name);
|
||||||
|
this.props.storeParagraphSettings.changeParaStyleName(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -229,7 +229,11 @@ const EditParagraph = props => {
|
||||||
key={index}
|
key={index}
|
||||||
radio
|
radio
|
||||||
checked={curStyleName === style.name}
|
checked={curStyleName === style.name}
|
||||||
onClick={() => {props.onStyleClick(style.name)}}
|
onClick={() => {
|
||||||
|
if(curStyleName !== style.name) {
|
||||||
|
props.onStyleClick(style.name);
|
||||||
|
}
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<div slot="inner"
|
<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'}}
|
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