Fixes to text annotation concerning new plugin API
This commit is contained in:
parent
9b407e2790
commit
0c033aab50
|
@ -34,9 +34,9 @@ export default class TextAnnotator extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.highlighter = new Highlighter(this.props.contentEl, this.props.formatter);
|
this.highlighter = new Highlighter(this.props.contentEl, this.props.config.formatter);
|
||||||
|
|
||||||
this.selectionHandler = new SelectionHandler(this.props.contentEl, this.highlighter, this.props.readOnly);
|
this.selectionHandler = new SelectionHandler(this.props.contentEl, this.highlighter, this.props.config.readOnly);
|
||||||
this.selectionHandler.on('select', this.handleSelect);
|
this.selectionHandler.on('select', this.handleSelect);
|
||||||
|
|
||||||
this.relationsLayer = new RelationsLayer(this.props.contentEl);
|
this.relationsLayer = new RelationsLayer(this.props.contentEl);
|
||||||
|
@ -266,8 +266,7 @@ export default class TextAnnotator extends Component {
|
||||||
wrapperEl={this.props.wrapperEl}
|
wrapperEl={this.props.wrapperEl}
|
||||||
annotation={this.state.selectedAnnotation}
|
annotation={this.state.selectedAnnotation}
|
||||||
selectedElement={this.state.selectedDOMElement}
|
selectedElement={this.state.selectedDOMElement}
|
||||||
readOnly={this.props.readOnly}
|
config={this.props.config}
|
||||||
headless={this.state.headless}
|
|
||||||
applyTemplate={this.state.applyTemplate}
|
applyTemplate={this.state.applyTemplate}
|
||||||
onAnnotationCreated={this.onCreateOrUpdateAnnotation('onAnnotationCreated')}
|
onAnnotationCreated={this.onCreateOrUpdateAnnotation('onAnnotationCreated')}
|
||||||
onAnnotationUpdated={this.onCreateOrUpdateAnnotation('onAnnotationUpdated')}
|
onAnnotationUpdated={this.onCreateOrUpdateAnnotation('onAnnotationUpdated')}
|
||||||
|
|
Loading…
Reference in New Issue