Skip to content
Snippets Groups Projects
Commit 70c653bb authored by chris's avatar chris
Browse files

update comments coposition when writing or toggling track changes view mode

parent a3f9f994
No related branches found
No related tags found
No related merge requests found
......@@ -46,25 +46,24 @@ class ContainerEditor extends SubstanceContainerEditor {
}
didMount () {
// TODO -- replace with super.didMount()
Surface.prototype.didMount.apply(this, arguments)
this.container.on('nodes:changed', this.onContainerChange, this)
// this.context.documentSession.on('didUpdate', (change, info) => {
// console.log('\n did update')
// console.log(this.getCommandStates())
// }, this)
super.didMount(this, arguments)
if (this.isEmpty()) this.createText()
this.focus()
const documentSession = this.getDocumentSession()
if (this.isReadOnlyMode()) {
const documentSession = this.getDocumentSession()
documentSession.on('didUpdate', this.disableToolbar, this)
this.addTargetToLinks()
}
documentSession.on('didUpdate', this.setCommentstops, this)
}
setCommentstops () {
this.context.commentsProvider.update()
}
onTextInput (event) {
......
......@@ -42,6 +42,10 @@ class Editor extends ProseEditor {
updateTrackChangeView () {
this.extendState({ trackChangesView: !this.state.trackChangesView })
// this.getChildContext().commentsProvider.update()
const surface = this.surfaceManager.getSurface(this.props.containerId)
setTimeout(function () {
surface.setCommentstops()
}, 250)
}
willUpdateState () {}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment