Versions
Within the comment element, we have introduced addManualComment
method to add manual comment with context.
API Method:
const commentElement = client.getCommentElement();
const config: ManualCommentAnnotationConfig = {
context: {}, // your context here
};
commentElement.addManualComment(config);
const commentElement = client.getCommentElement();
const config: ManualCommentAnnotationConfig = {
context: {}, // your context here
};
commentElement.addManualComment(config);
const commentElement = Velt.getCommentElement();
const config: ManualCommentAnnotationConfig = {
context: {}, // your context here
};
commentElement.addManualComment(config);
ManualCommentAnnotationConfig
Class:
export class ManualCommentAnnotationConfig {
context?: any;
}
We have added onCommentClick
callback in velt-comment-thread
component.
<velt-comment-thread annotation-id="COMMENT_ANNOTATION_ID"></velt-comment-thread>
<script>
const commentThreadTag = document.querySelector("velt-comment-thread");
commentThreadTag.addEventListener('onCommentClick', (event) => {
console.log('onCommentClick', event.detail);
});
</script>
<velt-comment-thread annotation-id="COMMENT_ANNOTATION_ID"></velt-comment-thread>
<script>
const commentThreadTag = document.querySelector("velt-comment-thread");
commentThreadTag.addEventListener('onCommentClick', (event) => {
console.log('onCommentClick', event.detail);
});
</script>
<VeltCommentThread
annotationId="COMMENT_ANNOTATION_ID"
onCommentClick={(data) => handleOnCommentClick(data)}
/>