From df2d12ef26612c175e391b7b71f0a30581dee7a7 Mon Sep 17 00:00:00 2001 From: chris <kokosias@yahoo.gr> Date: Sun, 19 Feb 2017 19:12:12 +0200 Subject: [PATCH] you can write in comment annotation once again --- .../SimpleEditor/elements/comment/CommentComponent.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/components/SimpleEditor/elements/comment/CommentComponent.js b/app/components/SimpleEditor/elements/comment/CommentComponent.js index 97a118c..8eb1887 100644 --- a/app/components/SimpleEditor/elements/comment/CommentComponent.js +++ b/app/components/SimpleEditor/elements/comment/CommentComponent.js @@ -29,7 +29,7 @@ class CommentComponent extends AnnotationComponent { return el } - shouldRerender (newProps) { + shouldRedraw (newProps) { if (this.hasNodeChanged()) { this.active = this.props.node.active this.rerender() @@ -39,14 +39,13 @@ class CommentComponent extends AnnotationComponent { // put here all conditions for the node to change hasNodeChanged () { const { node } = this.props - if (this.active !== node.active) return true return false } didMount () { const provider = this.getProvider() - provider.on('comments:updated', this.shouldRerender, this) + provider.on('comments:updated', this.shouldRedraw, this) } getProvider () { -- GitLab